Просмотр исходного кода

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 13 лет назад
Родитель
Сommit
c84d25b755
1 измененных файлов с 3 добавлено и 0 удалено
  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());