From 95643971be3393197aef0ace45dc179616d2846c Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Fri, 29 May 2009 21:10:17 +0000 Subject: [PATCH] * refactor: little tweaks to trigger another build --- .../Framework/Scenes/SceneObjectPart.cs | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index f0309e3a67..f3f63b701e 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs @@ -1877,8 +1877,10 @@ if (m_shape != null) { // always running this check because if the user deletes the object it would return a null reference. if (m_parentGroup == null) return; + if (m_parentGroup.Scene == null) return; + SceneObjectPart obj = m_parentGroup.Scene.GetSceneObjectPart(localId); if (obj != null) { @@ -1923,12 +1925,15 @@ if (m_shape != null) { // always running this check because if the user deletes the object it would return a null reference. if (m_parentGroup == null) return; + if (m_parentGroup.Scene == null) return; + m_parentGroup.Scene.EventManager.TriggerScriptCollidingStart(LocalId, StartCollidingMessage); } } } + if ((m_parentGroup.RootPart.ScriptEvents & scriptEvents.collision) != 0) { if (m_lastColliders.Count > 0) @@ -1943,8 +1948,10 @@ if (m_shape != null) { if (m_parentGroup == null) return; + if (m_parentGroup.Scene == null) return; + SceneObjectPart obj = m_parentGroup.Scene.GetSceneObjectPart(localId); if (obj != null) { @@ -1990,13 +1997,15 @@ if (m_shape != null) { // always running this check because if the user deletes the object it would return a null reference. if (m_parentGroup == null) return; + if (m_parentGroup.Scene == null) return; + m_parentGroup.Scene.EventManager.TriggerScriptColliding(LocalId, CollidingMessage); } - } } + if ((m_parentGroup.RootPart.ScriptEvents & scriptEvents.collision_end) != 0) { if (endedColliders.Count > 0) @@ -2048,28 +2057,30 @@ if (m_shape != null) { colliding.Add(detobj); } } - } } } + if (colliding.Count > 0) { EndCollidingMessage.Colliders = colliding; // always running this check because if the user deletes the object it would return a null reference. if (m_parentGroup == null) return; + if (m_parentGroup.Scene == null) return; + m_parentGroup.Scene.EventManager.TriggerScriptCollidingEnd(LocalId, EndCollidingMessage); } - } } } public void PhysicsOutOfBounds(PhysicsVector pos) { - m_log.Info("[PHYSICS]: Physical Object went out of bounds."); + m_log.Error("[PHYSICS]: Physical Object went out of bounds."); + RemFlag(PrimFlags.Physics); DoPhysicsPropertyUpdate(false, true); //m_parentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(PhysActor);