Fixed Garnaout issue with cinematic \o/

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9102 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
This commit is contained in:
rem..om 2012-01-19 19:42:27 +00:00
parent 38f56d3f2e
commit 4c7e271606

View File

@ -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;
}
}