Skip to content

Commit

Permalink
Clicking adjacent square no longer walks two squares
Browse files Browse the repository at this point in the history
  • Loading branch information
ethanmoffat committed Apr 10, 2022
1 parent a3e4d9f commit 749a333
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion EndlessClient/Rendering/Character/CharacterAnimator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,12 @@ private void AnimateCharacterWalking()
var characterCoord = new MapCoordinate(nextFrameRenderProperties.MapX, nextFrameRenderProperties.MapY);
_walkPath = _targetCoordinate.Match(
some: tc => _pathFinder.FindPath(characterCoord, tc),
some: tc =>
{
if (tc.Equals(characterCoord))
return new Queue<MapCoordinate>();
return _pathFinder.FindPath(characterCoord, tc);
},
none: () => new Queue<MapCoordinate>());
if (_walkPath.Any())
Expand Down

0 comments on commit 749a333

Please sign in to comment.