From ad99467cf2b313f57bff3807508114ef0caadc5f Mon Sep 17 00:00:00 2001 From: Nehon Date: Wed, 2 Apr 2014 20:34:54 +0200 Subject: [PATCH] Fixed issue where onAnimCycleDone was not called when playing an animation --- jme3-core/src/main/java/com/jme3/animation/AnimChannel.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/jme3-core/src/main/java/com/jme3/animation/AnimChannel.java b/jme3-core/src/main/java/com/jme3/animation/AnimChannel.java index 7605db937..4c362ff00 100644 --- a/jme3-core/src/main/java/com/jme3/animation/AnimChannel.java +++ b/jme3-core/src/main/java/com/jme3/animation/AnimChannel.java @@ -343,7 +343,7 @@ public final class AnimChannel { } animation.setTime(time, blendAmount, control, this, vars); - + time += tpf * speed; if (animation.getLength() > 0){ if (!notified && (time >= animation.getLength() || time < 0)) { if (loopMode == LoopMode.DontLoop) { @@ -355,7 +355,6 @@ public final class AnimChannel { control.notifyAnimCycleDone(this, animation.getName()); } } - time += tpf * speed; time = AnimationUtils.clampWrapTime(time, animation.getLength(), loopMode); if (time < 0){ // Negative time indicates that speed should be inverted