summaryrefslogtreecommitdiff
path: root/servers/physics_2d/space_2d_sw.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'servers/physics_2d/space_2d_sw.cpp')
-rw-r--r--servers/physics_2d/space_2d_sw.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/servers/physics_2d/space_2d_sw.cpp b/servers/physics_2d/space_2d_sw.cpp
index a71e6c4bf5..9f2f03baec 100644
--- a/servers/physics_2d/space_2d_sw.cpp
+++ b/servers/physics_2d/space_2d_sw.cpp
@@ -36,8 +36,8 @@ _FORCE_INLINE_ static bool _match_object_type_query(CollisionObject2DSW *p_objec
if ((p_object->get_layer_mask()&p_layer_mask)==0)
return false;
- if (p_object->get_type()==CollisionObject2DSW::TYPE_AREA && !(p_type_mask&Physics2DDirectSpaceState::TYPE_MASK_AREA))
- return false;
+ if (p_object->get_type()==CollisionObject2DSW::TYPE_AREA)
+ return p_type_mask&Physics2DDirectSpaceState::TYPE_MASK_AREA;
Body2DSW *body = static_cast<Body2DSW*>(p_object);