physics area added monitorable check

(cherry picked from commit fe768f4f00)
This commit is contained in:
Andrea Catania 2018-04-01 11:27:18 +02:00 committed by Hein-Pieter van Braam
parent ac9e87aae3
commit 640063334d
1 changed files with 4 additions and 1 deletions

View File

@ -660,7 +660,10 @@ void SpaceBullet::check_ghost_overlaps() {
// For each overlapping // For each overlapping
for (i = ghostOverlaps.size() - 1; 0 <= i; --i) { for (i = ghostOverlaps.size() - 1; 0 <= i; --i) {
if (!(ghostOverlaps[i]->getUserIndex() == CollisionObjectBullet::TYPE_RIGID_BODY || ghostOverlaps[i]->getUserIndex() == CollisionObjectBullet::TYPE_AREA)) if (ghostOverlaps[i]->getUserIndex() == CollisionObjectBullet::TYPE_AREA) {
if (!static_cast<AreaBullet *>(ghostOverlaps[i]->getUserPointer())->is_monitorable())
continue;
} else if (ghostOverlaps[i]->getUserIndex() != CollisionObjectBullet::TYPE_RIGID_BODY)
continue; continue;
otherObject = static_cast<RigidCollisionObjectBullet *>(ghostOverlaps[i]->getUserPointer()); otherObject = static_cast<RigidCollisionObjectBullet *>(ghostOverlaps[i]->getUserPointer());