From e0adbb323713dd60e6624db839ac25816c94b6ca Mon Sep 17 00:00:00 2001 From: Ivan Savenko Date: Wed, 23 Apr 2025 10:49:37 +0300 Subject: [PATCH] Fix calculating of total cost if hero has non-max amount of points --- client/adventureMap/AdventureMapInterface.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/adventureMap/AdventureMapInterface.cpp b/client/adventureMap/AdventureMapInterface.cpp index 17847fad0..749f1b1dc 100644 --- a/client/adventureMap/AdventureMapInterface.cpp +++ b/client/adventureMap/AdventureMapInterface.cpp @@ -779,8 +779,8 @@ void AdventureMapInterface::showMoveDetailsInStatusbar(const CGHeroInstance & he const int movementPointsLastTurnCost = maxMovementPointsAtStartOfLastTurn - pathNode.moveRemains; const int remainingPointsAfterMove = pathNode.moveRemains; - int totalMovementCost = 0; - for (int i = 0; i <= pathNode.turns; ++i) + int totalMovementCost = hero.movementPointsRemaining(); + for (int i = 1; i <= pathNode.turns; ++i) { auto turnInfo = hero.getTurnInfo(i); if (pathNode.layer == EPathfindingLayer::SAIL)