소스 검색

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