1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-29 23:07:48 +02:00
This commit is contained in:
MichalZr6
2024-11-12 07:11:18 +01:00
parent 78845706c9
commit 8c3a417527
39 changed files with 4399 additions and 4410 deletions

View File

@@ -117,6 +117,7 @@ Path Path::search(const Tileset & dst, bool straight, std::function<float(const
return;
float movementCost = moveCostFunction(currentNode, pos);
float distance = distances[currentNode] + movementCost; //we prefer to use already free paths
int bestDistanceSoFar = std::numeric_limits<int>::max();
auto it = distances.find(pos);