From 19279450537ffffc71bf67f1efb4b50b4c7d5065 Mon Sep 17 00:00:00 2001 From: John Hurliman Date: Mon, 2 Nov 2009 15:09:07 -0800 Subject: Another race condition fix in SceneObjectGroup --- OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index 0b752c9..c65a665 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs @@ -2946,12 +2946,13 @@ namespace OpenSim.Region.Framework.Scenes /// public void UpdateGroupRotationR(Quaternion rot) { - m_rootPart.UpdateRotation(rot); - if (m_rootPart.PhysActor != null) + + PhysicsActor actor = m_rootPart.PhysActor; + if (actor != null) { - m_rootPart.PhysActor.Orientation = m_rootPart.RotationOffset; - m_scene.PhysicsScene.AddPhysicsActorTaint(m_rootPart.PhysActor); + actor.Orientation = m_rootPart.RotationOffset; + m_scene.PhysicsScene.AddPhysicsActorTaint(actor); } HasGroupChanged = true; @@ -2966,11 +2967,14 @@ namespace OpenSim.Region.Framework.Scenes public void UpdateGroupRotationPR(Vector3 pos, Quaternion rot) { m_rootPart.UpdateRotation(rot); - if (m_rootPart.PhysActor != null) + + PhysicsActor actor = m_rootPart.PhysActor; + if (actor != null) { - m_rootPart.PhysActor.Orientation = m_rootPart.RotationOffset; - m_scene.PhysicsScene.AddPhysicsActorTaint(m_rootPart.PhysActor); + actor.Orientation = m_rootPart.RotationOffset; + m_scene.PhysicsScene.AddPhysicsActorTaint(actor); } + AbsolutePosition = pos; HasGroupChanged = true; -- cgit v1.1