浏览代码

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