Quellcode durchsuchen

fix issue where AnimChannel.update() fails to invoke onAnimCycleDone(): corresponds to ad99467cf2b313f57bff3807508114ef0caadc5f in master

[email protected] vor 11 Jahren
Ursprung
Commit
fb681741de
1 geänderte Dateien mit 1 neuen und 2 gelöschten Zeilen
  1. 1 2
      engine/src/core/com/jme3/animation/AnimChannel.java

+ 1 - 2
engine/src/core/com/jme3/animation/AnimChannel.java

@@ -401,7 +401,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) {
@@ -413,7 +413,6 @@ public final class AnimChannel {
                 control.notifyAnimCycleDone(this, animation.getName());
             } 
         }
-        time += tpf * speed;      
         time = clampWrapTime(time, animation.getLength(), loopMode);
         if (time < 0){
             // Negative time indicates that speed should be inverted