Преглед изворни кода

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

Ivan Savenko пре 1 година
родитељ
комит
4787b9eded
1 измењених фајлова са 1 додато и 1 уклоњено
  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()