Fix 3D Area mask matching

This commit is contained in:
eska 2015-10-10 02:33:26 +02:00
parent 13ff4bde65
commit 375a7a727f

View File

@ -34,10 +34,10 @@
_FORCE_INLINE_ static bool _match_object_type_query(CollisionObjectSW *p_object, uint32_t p_layer_mask, uint32_t p_type_mask) {
if ((p_object->get_layer_mask()&p_layer_mask)==0)
return false;
if (p_object->get_type()==CollisionObjectSW::TYPE_AREA)
return p_type_mask&PhysicsDirectSpaceState::TYPE_MASK_AREA;
if (p_object->get_type()==CollisionObjectSW::TYPE_AREA && !(p_type_mask&PhysicsDirectSpaceState::TYPE_MASK_AREA))
if ((p_object->get_layer_mask()&p_layer_mask)==0)
return false;
BodySW *body = static_cast<BodySW*>(p_object);