From f8dec3861b98bbf797c14878cb7871b7da4f526a Mon Sep 17 00:00:00 2001 From: Ivan Savenko Date: Fri, 30 Dec 2022 11:56:26 +0200 Subject: [PATCH] Fixed animation skipping with no sound mod and enemy having first turn --- client/gui/CGuiHandler.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/client/gui/CGuiHandler.cpp b/client/gui/CGuiHandler.cpp index 32a79e736..5e39465b3 100644 --- a/client/gui/CGuiHandler.cpp +++ b/client/gui/CGuiHandler.cpp @@ -451,7 +451,7 @@ void CGuiHandler::renderFrame() bool acquiredTheLockOnPim = false; //for tracking whether pim mutex locking succeeded while(!terminate_cond->get() && !(acquiredTheLockOnPim = CPlayerInterface::pim->try_lock())) //try acquiring long until it succeeds or we are told to terminate - boost::this_thread::sleep(boost::posix_time::milliseconds(15)); + boost::this_thread::sleep(boost::posix_time::milliseconds(1)); if(acquiredTheLockOnPim) { @@ -623,8 +623,8 @@ void CFramerateManager::framerateDelay() currentTicks = SDL_GetTicks(); // recalculate timeElapsed for external calls via getElapsed() - // limit it to 1000 ms to avoid breaking animation in case of huge lag (e.g. triggered breakpoint) - timeElapsed = std::min(currentTicks - lastticks, 1000); + // limit it to 100 ms to avoid breaking animation in case of huge lag (e.g. triggered breakpoint) + timeElapsed = std::min(currentTicks - lastticks, 100); lastticks = SDL_GetTicks();