Added workaround for ~200 ms lag occuring after hero move

This commit is contained in:
Ivan Savenko committed 2023-01-09 13:05:28 +02:00
1 parent 8526eba6fa
commit 9308319ac7
2 files changed
+4 -1

No files matched your search

+3
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);
+1 -1
View File
@@ -1044,7 +1044,7 @@ void CAdvMapInt::show(SDL_Surface * to)
{
++heroAnim;
}
if(animValHitCount == 8)
if(animValHitCount >= 8)
{
CGI->mh->updateWater();
animValHitCount = 0;