From 88306b6e12581f5f9c4c80fa692a63835dcda2b3 Mon Sep 17 00:00:00 2001 From: photonstorm Date: Tue, 20 May 2014 10:02:01 +0100 Subject: [PATCH] P2 World array reset fix. --- src/physics/p2/Body.js | 1 + src/physics/p2/World.js | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/physics/p2/Body.js b/src/physics/p2/Body.js index 784af8d235..f97cfc6728 100644 --- a/src/physics/p2/Body.js +++ b/src/physics/p2/Body.js @@ -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? */ diff --git a/src/physics/p2/World.js b/src/physics/p2/World.js index 6ffc8693ed..52e4de8239 100644 --- a/src/physics/p2/World.js +++ b/src/physics/p2/World.js @@ -1446,7 +1446,6 @@ Phaser.Physics.P2.prototype = { { output.push(body); } - } return output; @@ -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; },