From c3309985183ebbaf74f50c14a666316c47d58543 Mon Sep 17 00:00:00 2001 From: Ivan Savenko Date: Wed, 27 Sep 2023 17:17:06 +0300 Subject: [PATCH] Fix freeze on moving through teleporters without set path --- client/HeroMovementController.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/client/HeroMovementController.cpp b/client/HeroMovementController.cpp index 4f332fdbe..313d8b653 100644 --- a/client/HeroMovementController.cpp +++ b/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()