From 4c7e2716063b78fadb3f85c81d22c1f9296ce073 Mon Sep 17 00:00:00 2001 From: "rem..om" Date: Thu, 19 Jan 2012 19:42:27 +0000 Subject: [PATCH] Fixed Garnaout issue with cinematic \o/ git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9102 75d07b2b-3a1a-0410-a2c5-0572b91ccdca --- .../jme3/cinematic/events/AbstractCinematicEvent.java | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/engine/src/core/com/jme3/cinematic/events/AbstractCinematicEvent.java b/engine/src/core/com/jme3/cinematic/events/AbstractCinematicEvent.java index 8ceac9275..42734a556 100644 --- a/engine/src/core/com/jme3/cinematic/events/AbstractCinematicEvent.java +++ b/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; } - - - - }