Phaser.Time physicsElapsed delta timer clamp added. Stops rogue iOS / slow mobile timer errors causing crazy high deltas.

This commit is contained in:
photonstorm
2013-10-23 17:11:06 +01:00
parent 94c7c57e1c
commit 7e5f38d022
6 changed files with 22 additions and 12 deletions
+6
View File
@@ -202,6 +202,12 @@ Phaser.Time.prototype = {
this.lastTime = time + this.timeToCall;
this.physicsElapsed = 1.0 * (this.elapsed / 1000);
// Clamp the delta
if (this.physicsElapsed > 1)
{
this.physicsElapsed = 1;
}
// Paused?
if (this.game.paused)
{