v0.6.0: game motion now uses time since boot instead of time since UTC

This 'should' fix animation oddness caused by device time syncing during gameplay
This commit is contained in:
Evan Debenham 2017-03-04 13:23:51 -05:00
parent c64a468db5
commit 2f18c7146b

View File

@ -45,6 +45,7 @@ import android.opengl.GLES20;
import android.opengl.GLSurfaceView;
import android.os.Build;
import android.os.Bundle;
import android.os.SystemClock;
import android.os.Vibrator;
import android.util.DisplayMetrics;
import android.view.KeyEvent;
@ -223,7 +224,7 @@ public class Game extends Activity implements GLSurfaceView.Renderer, View.OnTou
}
SystemTime.tick();
long rightNow = SystemTime.now;
long rightNow = SystemClock.elapsedRealtime();
step = (now == 0 ? 0 : rightNow - now);
now = rightNow;