1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-01-12 02:28:11 +02:00

Added workaround for ~200 ms lag occuring after hero move

This commit is contained in:
Ivan Savenko 2023-01-08 18:05:00 +02:00
parent 8526eba6fa
commit 9308319ac7
2 changed files with 4 additions and 1 deletions

View File

@ -2550,6 +2550,9 @@ void CPlayerInterface::doMoveHero(const CGHeroInstance * h, CGPath path)
// (i == 0) means hero went through all the path
adventureInt->updateMoveHero(h, (i != 0));
adventureInt->updateNextHero(h);
// ugly workaround to force instant update of adventure map
adventureInt->animValHitCount = 8;
}
setMovementStatus(false);

View File

@ -1044,7 +1044,7 @@ void CAdvMapInt::show(SDL_Surface * to)
{
++heroAnim;
}
if(animValHitCount == 8)
if(animValHitCount >= 8)
{
CGI->mh->updateWater();
animValHitCount = 0;