From: LockedLunatic Date: Tue, 28 Jun 2016 01:42:28 +0000 (+0200) Subject: stop animation when jumping X-Git-Url: https://git.leopard-lacewing.eu/?a=commitdiff_plain;h=3149402c551951cca6ac2eb55f9d1dbd75f6dadd;p=cgue_weave.git stop animation when jumping --- diff --git a/Weave/Scene/Marvin.cpp b/Weave/Scene/Marvin.cpp index 43c3088..d0a3425 100644 --- a/Weave/Scene/Marvin.cpp +++ b/Weave/Scene/Marvin.cpp @@ -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) {