From 46ab64aa48cb6336e1131e6e746479b4a65ec563 Mon Sep 17 00:00:00 2001 From: Krzysztof Stefan Rudnicki Date: Fri, 3 Jun 2022 14:02:20 +0200 Subject: [PATCH] restore old path finding value --- theProject/Assets/Scripts/Entities/Soldier.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/theProject/Assets/Scripts/Entities/Soldier.cs b/theProject/Assets/Scripts/Entities/Soldier.cs index fcfe7155..158b6235 100644 --- a/theProject/Assets/Scripts/Entities/Soldier.cs +++ b/theProject/Assets/Scripts/Entities/Soldier.cs @@ -30,7 +30,7 @@ public class Soldier : Entity return; // cannot find path: do nothing (for now) } - Vector2Int movementStepDestination = path[path.Count - 1]; + Vector2Int movementStepDestination = path[0]; if (!TilemapManager.MoveSoldierS(soldier.tileCoord.x, soldier.tileCoord.y, movementStepDestination.x, movementStepDestination.y))