Browse Source

Fix freeze on moving through teleporters without set path

Ivan Savenko 2 năm trước cách đây
mục cha
commit
c330998518
1 tập tin đã thay đổi với 4 bổ sung7 xóa
  1. 4 7
      client/HeroMovementController.cpp

+ 4 - 7
client/HeroMovementController.cpp

@@ -203,15 +203,12 @@ void HeroMovementController::onTryMoveHero(const CGHeroInstance * hero, const Tr
 
 void HeroMovementController::onQueryReplyApplied()
 {
-	if(duringMovement)
-	{
-		// Server accepted our TeleportDialog query reply and moved hero
-		// Continue moving alongside our path, if any
+	waitingForQueryApplyReply = false;
 
-		assert(waitingForQueryApplyReply);
-		waitingForQueryApplyReply = false;
+	// Server accepted our TeleportDialog query reply and moved hero
+	// Continue moving alongside our path, if any
+	if(duringMovement)
 		onMoveHeroApplied();
-	}
 }
 
 void HeroMovementController::onMoveHeroApplied()