Browse Source

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

Ivan Savenko 2 years ago
parent
commit
6546242c03
1 changed files with 6 additions and 0 deletions
  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()