]> git.leopard-lacewing.eu Git - cgue_weave.git/commitdiff
stop animation when jumping
authorLockedLunatic <locked.lunatic@aon.at>
Tue, 28 Jun 2016 01:42:28 +0000 (03:42 +0200)
committerLockedLunatic <locked.lunatic@aon.at>
Tue, 28 Jun 2016 01:42:28 +0000 (03:42 +0200)
Weave/Scene/Marvin.cpp

index 43c308838484b93ead00e1bcd149f6fa0daf28ad..d0a3425144536397b74755d44d1d09e1a5e35684 100644 (file)
@@ -43,6 +43,7 @@ void Marvin::update(float deltaT)
                if (Events::getJump() && abs(yFloorDist) < .5)
                {
                        ySpeed = 5.5;
+                       startanimation(0, 0);
                        //startanimation(1, 1);
                        //setAnimationLoop(false);
                }
@@ -70,7 +71,7 @@ void Marvin::update(float deltaT)
                }
 
                //MOVE Animation
-               if (abs(yFloorDist) < .5)
+               if (abs(yFloorDist) < .5 && ySpeed <= 0)
                {
                        if (move_y > 0)
                        {