From ed0661e25ad6457b993ec498a665a9c794991a2e Mon Sep 17 00:00:00 2001 From: idb Date: Sun, 18 Jan 2009 11:25:12 +0000 Subject: Subscribe to collision events if needed when turning an object to non-phantom from phantom. Fixes Mantis #1883 --- OpenSim/Region/Environment/Scenes/SceneObjectPart.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'OpenSim/Region/Environment') diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs index 991d5c9..0f36e82 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs @@ -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 -- cgit v1.1