mirror of
https://github.com/photonstorm/phaser
synced 2024-11-16 01:38:23 +00:00
Merge pull request #758 from georgiee/elapsed-time
fix p2 elapsed time bug
This commit is contained in:
commit
523c6c3f59
1 changed files with 3 additions and 1 deletions
|
@ -234,7 +234,9 @@ Phaser.Time.prototype = {
|
|||
this.timeToCall = this.game.math.max(0, 16 - (time - this.lastTime));
|
||||
|
||||
this.elapsed = this.now - this.time;
|
||||
this.physicsElapsed = this.elapsed / 1000;
|
||||
|
||||
//calculate physics elapsed, ensure it's > 0, use 1/60 as a fallback
|
||||
this.physicsElapsed = this.elapsed / 1000 || 1/60;
|
||||
|
||||
if (this.deltaCap > 0 && this.physicsElapsed > this.deltaCap)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue