1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-23 22:37:55 +02:00

Movement animation is now more smooth at high animation speeds

This commit is contained in:
Ivan Savenko
2023-01-04 17:21:40 +02:00
parent 7657115c5a
commit d8c4209ded
2 changed files with 3 additions and 2 deletions

View File

@@ -368,7 +368,7 @@ bool MovementAnimation::init()
begX = begPosition.x;
begY = begPosition.y;
progress = 0;
//progress = 0;
distanceX = endPosition.x - begPosition.x;
distanceY = endPosition.y - begPosition.y;
@@ -394,6 +394,7 @@ void MovementAnimation::nextFrame()
if(progress >= 1.0)
{
progress -= 1.0;
// Sets the position of the creature animation sprites
Point coords = owner.stacksController->getStackPositionAtHex(nextHex, stack);
myAnim->pos.moveTo(coords);

View File

@@ -489,7 +489,7 @@ CGuiHandler::CGuiHandler()
statusbar = nullptr;
// Creates the FPS manager and sets the framerate to 48 which is doubled the value of the original Heroes 3 FPS rate
mainFPSmng = new CFramerateManager(48);
mainFPSmng = new CFramerateManager(60);
//do not init CFramerateManager here --AVS
terminate_cond = new CondSh<bool>(false);