mirror of
https://github.com/wassname/phaser.git
synced 2026-07-21 12:40:56 +08:00
Phaser.Time physicsElapsed delta timer clamp added. Stops rogue iOS / slow mobile timer errors causing crazy high deltas.
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user