Explorar o código

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

Ivan Savenko hai 1 ano
pai
achega
4787b9eded
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      client/adventureMap/AdventureMapShortcuts.cpp

+ 1 - 1
client/adventureMap/AdventureMapShortcuts.cpp

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