浏览代码

Workaround-ish fix for last scenario of Angel Wings (un)equipping

Ivan Savenko 2 年之前
父节点
当前提交
6546242c03
共有 1 个文件被更改,包括 6 次插入0 次删除
  1. 6 0
      client/adventureMap/AdventureMapInterface.cpp

+ 6 - 0
client/adventureMap/AdventureMapInterface.cpp

@@ -125,6 +125,12 @@ void AdventureMapInterface::activate()
 	}
 
 	GH.fakeMouseMove(); //to restore the cursor
+
+	// workaround for an edge case:
+	// if player unequips Angel Wings / Boots of Levitation of currently active hero
+	// game will correctly invalidate paths but current route will not be updated since verifyPath() is not called for current hero
+	if (LOCPLINT->makingTurn && LOCPLINT->localState->getCurrentHero())
+		LOCPLINT->localState->verifyPath(LOCPLINT->localState->getCurrentHero());
 }
 
 void AdventureMapInterface::deactivate()