Skip to content

Commit 26e74fe

Browse files
committed
Merge pull request phaserjs#1315 from pjbaron/dev
Minor logic fix and updateRender change
2 parents b5ed332 + 1c5a106 commit 26e74fe

2 files changed

Lines changed: 7 additions & 6 deletions

File tree

src/core/Game.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -719,7 +719,8 @@ Phaser.Game.prototype = {
719719
this._deltaTime = 0;
720720
this._spiralling = 0;
721721

722-
var slowStep = this.time.slowMotion * 1000.0 / this.time.desiredFps;
722+
// call the game render update exactly once every frame
723+
this.updateRender(this.time.slowMotion * this.time.desiredFps);
723724
}
724725
else
725726
{
@@ -757,10 +758,10 @@ Phaser.Game.prototype = {
757758
}
758759

759760
this._lastCount = count;
760-
}
761761

762-
// call the game render update exactly once every frame
763-
this.updateRender(this._deltaTime / slowStep);
762+
// call the game render update exactly once every frame unless we're playing catch-up from a spiral condition
763+
this.updateRender(this._deltaTime / slowStep);
764+
}
764765

765766
},
766767

src/physics/arcade/World.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -652,9 +652,9 @@ Phaser.Physics.Arcade.prototype = {
652652

653653
var len = group.children.length;
654654

655-
for (var i = 0; i < len; i++)
655+
for (var i = 0; i < len - 1; i++)
656656
{
657-
for (var j = i + 1; j <= len; j++)
657+
for (var j = i + 1; j < len; j++)
658658
{
659659
if (group.children[i] && group.children[j] && group.children[i].exists && group.children[j].exists)
660660
{

0 commit comments

Comments
 (0)