Explorar o código

EffectTrack now correctly stops when loopMode is DontLoop

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9870 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
rem..om %!s(int64=13) %!d(string=hai) anos
pai
achega
c84d25b755
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  1. 3 0
      engine/src/core/com/jme3/animation/EffectTrack.java

+ 3 - 0
engine/src/core/com/jme3/animation/EffectTrack.java

@@ -192,6 +192,9 @@ public class EffectTrack implements ClonableTrack {
      */
     public void setTime(float time, float weight, AnimControl control, AnimChannel channel, TempVars vars) {
 
+        if (time == length) {
+            return;
+        }
         //first time adding the Animation listener to stop the track at the end of the animation
         if (!initialized) {
             control.addListener(new OnEndListener());