Arcade Physics could trigger a collide event on a Body even if it performing an overlap check, if the onCollide property was true

This commit is contained in:
Richard Davey 2019-01-18 16:16:14 +00:00
parent 63e1ddb20b
commit 4c24799eac
2 changed files with 6 additions and 2 deletions

View file

@ -304,6 +304,7 @@ one set of bindings ever created, which makes things a lot cleaner.
* The `processDomCallbacks` method in the Input Manager wasn't correctly clearing the `once` arrays. Responsibility for this has now been passed to the queue methods `queueTouchStart`, `queueTouchMove`, `queueTouchEnd`, `queueMouseDown`, `queueMouseMove` and `queueMouseUp`. Fix #4257 (thanks @iArePJ)
* The fontFamily in the Text object is now quoted when synced to the Canvas context, this fixes an issue where you couldn't use web fonts that had numbers in the name, such as "Press Start 2P" (thanks @BeFiveINFO)
* Arcade Physics now manages when `postUpdate` should be applied better, stopping it from gaining a zero delta during a further check in the same frame. This fixes various issues, including the mass collision test demo. Fix #4154 (thanks @samme)
* Arcade Physics could trigger a `collide` event on a Body even if it performing an overlap check, if the `onCollide` property was true (thanks @samme)
### Important Namespace Changes

View file

@ -1470,9 +1470,12 @@ var World = new Class({
if (result)
{
if (overlapOnly && (body1.onOverlap || body2.onOverlap))
if (overlapOnly)
{
this.emit(Events.OVERLAP, body1.gameObject, body2.gameObject, body1, body2);
if (body1.onOverlap || body2.onOverlap)
{
this.emit(Events.OVERLAP, body1.gameObject, body2.gameObject, body1, body2);
}
}
else
{