1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-08 23:36:33 +02:00

Fix freeze on moving through teleporters without set path

This commit is contained in:
Ivan Savenko 2023-09-27 17:17:06 +03:00
parent 97097c20ad
commit c330998518

View File

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