1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-08-10 22:31:40 +02:00

Fix calculating of total cost if hero has non-max amount of points

This commit is contained in:
Ivan Savenko
2025-04-23 10:49:37 +03:00
parent fb97891cd3
commit e0adbb3237

View File

@@ -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)