Fixed Garnaout issue with cinematic \o/

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9102 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
3.0
rem..om 13 years ago
parent 38f56d3f2e
commit 4c7e271606
  1. 11
      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;
}
}

Loading…
Cancel
Save