Browse Source

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

Ivan Savenko 1 year ago
parent
commit
4787b9eded
1 changed files with 1 additions and 1 deletions
  1. 1 1
      client/adventureMap/AdventureMapShortcuts.cpp

+ 1 - 1
client/adventureMap/AdventureMapShortcuts.cpp

@@ -456,7 +456,7 @@ bool AdventureMapShortcuts::optionHeroSelected()
 bool AdventureMapShortcuts::optionHeroCanMove()
 bool AdventureMapShortcuts::optionHeroCanMove()
 {
 {
 	const auto * hero = LOCPLINT->localState->getCurrentHero();
 	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()
 bool AdventureMapShortcuts::optionHasNextHero()