Merge pull request #4949 from samme/fix/collideSpriteVsSprite

Check for disabled body in collideSpriteVsGroup()
This commit is contained in:
Richard Davey 2020-01-13 11:34:36 +00:00 committed by GitHub
commit 8b9819b8f7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1948,7 +1948,7 @@ var World = new Class({
{ {
bodyB = results[i]; bodyB = results[i];
if (bodyA === bodyB || !group.contains(bodyB.gameObject)) if (bodyA === bodyB || !bodyB.enable || !group.contains(bodyB.gameObject))
{ {
// Skip if comparing against itself, or if bodyB isn't actually part of the Group // Skip if comparing against itself, or if bodyB isn't actually part of the Group
continue; continue;