From 3149402c551951cca6ac2eb55f9d1dbd75f6dadd Mon Sep 17 00:00:00 2001 From: LockedLunatic Date: Tue, 28 Jun 2016 03:42:28 +0200 Subject: [PATCH] stop animation when jumping --- Weave/Scene/Marvin.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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) { -- 2.47.3