Skip to content

Commit

Permalink
P2 World array reset fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
photonstorm committed May 20, 2014
1 parent 0081962 commit 88306b6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/physics/p2/Body.js
Original file line number Diff line number Diff line change
Expand Up @@ -1748,6 +1748,7 @@ Object.defineProperty(Phaser.Physics.P2.Body.prototype, "debug", {
/**
* A Body can be set to collide against the World bounds automatically if this is set to true. Otherwise it will leave the World.
* Note that this only applies if your World has bounds! The response to the collision should be managed via CollisionMaterials.
*
* @name Phaser.Physics.P2.Body#collideWorldBounds
* @property {boolean} collideWorldBounds - Should the Body collide with the World bounds?
*/
Expand Down
3 changes: 1 addition & 2 deletions src/physics/p2/World.js
Original file line number Diff line number Diff line change
Expand Up @@ -1446,7 +1446,6 @@ Phaser.Physics.P2.prototype = {
{
output.push(body);
}

}

return output;
Expand All @@ -1471,7 +1470,7 @@ Phaser.Physics.P2.prototype = {
map.layers[layer].bodies[i].destroy();
}

map.layers[layer].bodies.length = [];
map.layers[layer].bodies.length = 0;

},

Expand Down

0 comments on commit 88306b6

Please sign in to comment.