Merge pull request #758 from georgiee/elapsed-time

fix p2 elapsed time bug
This commit is contained in:
Richard Davey 2014-04-24 13:11:09 +01:00
commit 523c6c3f59

View file

@ -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)
{