Subscribe to collision events if needed when turning an object to non-phantom from phantom.

Fixes Mantis #1883
0.6.3-post-fixes
idb 2009-01-18 11:25:12 +00:00
parent 37b63636ee
commit ed0661e25a
1 changed files with 10 additions and 0 deletions

View File

@ -3478,6 +3478,16 @@ if (m_shape != null) {
}
}
}
if (
((AggregateScriptEvents & scriptEvents.collision) != 0) ||
((AggregateScriptEvents & scriptEvents.collision_end) != 0) ||
((AggregateScriptEvents & scriptEvents.collision_start) != 0) ||
(CollisionSound != UUID.Zero)
)
{
PhysActor.OnCollisionUpdate += PhysicsCollision;
PhysActor.SubscribeEvents(1000);
}
}
}
else // it already has a physical representation