summaryrefslogtreecommitdiff
path: root/servers/physics_2d
diff options
context:
space:
mode:
authoreska <eska@eska.me>2015-10-09 21:54:16 +0200
committereska <eska@eska.me>2015-10-09 21:54:16 +0200
commit13ff4bde650149577185d6d4c61b924cf0896d98 (patch)
treec38cfffdd274c2a96de0f75efc1df1db8f45811b /servers/physics_2d
parentaad2bbdb6fb7c8217d7e75480b38e45f00cb3abd (diff)
Fix Area2D type mask matching
Diffstat (limited to 'servers/physics_2d')
-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);