mirror of
https://github.com/photonstorm/phaser
synced 2024-11-26 14:40:38 +00:00
Under setTimeOut (or when forceSetTimeOut
was true) the Time was incorrectly setting Time.timeExpected
causing game updates to lag (thanks @satan6 #2087)
This commit is contained in:
parent
5c30a228bb
commit
a8e972b25a
2 changed files with 3 additions and 2 deletions
|
@ -290,6 +290,7 @@ If you are an exceptional JavaScript developer and would like to join the Phaser
|
|||
* Sound.onEndedHandler has a fix for AudioBufferSourceNode listener memory leak (thanks @Pappa #2069)
|
||||
* Game.update could call `updateLogic` multiple times in a single frame when catching up with slow device frame rates. This would cause Tweens to advance at twice the speed they should have done (thanks @mkristo)
|
||||
* Added useCapture flags to removeEventListener in MSPointer class (thanks @pmcmonagle #2055)
|
||||
* Under setTimeOut (or when `forceSetTimeOut` was true) the Time was incorrectly setting `Time.timeExpected` causing game updates to lag (thanks @satan6 #2087)
|
||||
|
||||
For changes in previous releases please see the extensive [Version History](https://github.com/photonstorm/phaser/blob/master/CHANGELOG.md).
|
||||
|
||||
|
|
|
@ -385,10 +385,10 @@ Phaser.Time.prototype = {
|
|||
if (this.game.raf._isSetTimeOut)
|
||||
{
|
||||
// time to call this function again in ms in case we're using timers instead of RequestAnimationFrame to update the game
|
||||
this.timeToCall = Math.floor(Math.max(0, (1000.0 / this._desiredFps) - (this.timeCallExpected - time)));
|
||||
this.timeToCall = Math.floor(Math.max(0, (1000.0 / this._desiredFps) - (this.timeExpected - time)));
|
||||
|
||||
// time when the next call is expected if using timers
|
||||
this.timeCallExpected = time + this.timeToCall;
|
||||
this.timeExpected = time + this.timeToCall;
|
||||
}
|
||||
|
||||
if (this.advancedTiming)
|
||||
|
|
Loading…
Reference in a new issue