P2.World.updateBoundsCollisionGroup wouldn't use the boundsCollisionGroup mask if you passed true as the argument, only if it was left undefined.

This commit is contained in:
photonstorm 2016-04-07 01:18:19 +01:00
parent 58af40ca92
commit 4d5a037ae5
2 changed files with 3 additions and 2 deletions

View file

@ -373,6 +373,7 @@ You can read all about the philosophy behind Lazer [here](http://phaser.io/news/
* Sound.play when using an AudioTag would ignore the muted state of the SoundManager and play regardless. It now checks the SoundManager.mute state on play, and sets the volume accorindingly (thanks @brianbunch #2139)
* Graphics objects can now have a Physics Body directly attached to them, where-as before it would throw an error due to a lack of anchor property (thanks @NLilley #2400)
* A Game Object with `fixedToCamera = true` that was then set for Input, and enabled for dragging from its center (`input.enableDrag(true)`) would throw an error upon being dragged (thanks @solusipse #2367)
* P2.World.updateBoundsCollisionGroup wouldn't use the `boundsCollisionGroup` mask if you passed `true` as the argument, only if it was left undefined.
### Pixi Updates

View file

@ -615,9 +615,9 @@ Phaser.Physics.P2.prototype = {
*/
updateBoundsCollisionGroup: function (setCollisionGroup) {
var mask = this.everythingCollisionGroup.mask;
if (setCollisionGroup === undefined) { setCollisionGroup = true; }
if (setCollisionGroup === undefined) { mask = this.boundsCollisionGroup.mask; }
var mask = (setCollisionGroup) ? this.boundsCollisionGroup.mask : this.everythingCollisionGroup.mask;
if (this.walls.left)
{