Bläddra i källkod

Fixed Garnaout issue with cinematic \o/

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9102 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
rem..om 13 år sedan
förälder
incheckning
4c7e271606

+ 4 - 7
engine/src/core/com/jme3/cinematic/events/AbstractCinematicEvent.java

@@ -133,7 +133,8 @@ public abstract class AbstractCinematicEvent implements CinematicEvent {
      */
     public void internalUpdate(float tpf) {
         if (playState == PlayState.Playing) {
-            time = (elapsedTimePause + timer.getTimeInSeconds() - start) * speed;
+            //time = time+ (tpf * speed);
+            time = elapsedTimePause + (timer.getTimeInSeconds() - start) * speed;
 
             onUpdate(tpf);
             if (time >= initialDuration && loopMode == loopMode.DontLoop) {
@@ -326,8 +327,8 @@ public abstract class AbstractCinematicEvent implements CinematicEvent {
      * @param time the time to fast forward to
      */
     public void setTime(float time) {
-        elapsedTimePause = time/speed;
-        if(playState == PlayState.Playing){
+        elapsedTimePause = time / speed;
+        if (playState == PlayState.Playing) {
             start = timer.getTimeInSeconds();
         }
     }
@@ -335,8 +336,4 @@ public abstract class AbstractCinematicEvent implements CinematicEvent {
     public float getTime() {
         return time;
     }
-    
-    
-    
-    
 }