1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-02-03 13:01:33 +02:00

Block movement if first node in path needs more move points that we have

This commit is contained in:
Ivan Savenko 2024-05-13 17:25:20 +00:00
parent 2ddc6a1459
commit 4787b9eded

View File

@ -456,7 +456,7 @@ bool AdventureMapShortcuts::optionHeroSelected()
bool AdventureMapShortcuts::optionHeroCanMove()
{
const auto * hero = LOCPLINT->localState->getCurrentHero();
return optionInMapView() && hero && hero->movementPointsRemaining() != 0 && LOCPLINT->localState->hasPath(hero);
return optionInMapView() && hero && LOCPLINT->localState->hasPath(hero) && LOCPLINT->localState->getPath(hero).nextNode().turns == 0;
}
bool AdventureMapShortcuts::optionHasNextHero()