mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-27 22:49:25 +02:00
Movement animation is now more smooth at high animation speeds
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user