mirror of
https://github.com/opensim/opensim.git
synced 2026-08-07 17:55:48 +08:00
Subscribe to collision events if needed when turning an object to non-phantom from phantom.
Fixes Mantis #1883
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user