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/Framework/Scenes/SceneObjectGroup.cs') 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 From ec2ebf2598028daf4ff2003a53be3ca40ffc8272 Mon Sep 17 00:00:00 2001 From: John Hurliman Date: Wed, 4 Nov 2009 16:08:10 -0800 Subject: Removing EntityBase.Rotation --- OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs') diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index c65a665..f938472 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs @@ -204,6 +204,14 @@ namespace OpenSim.Region.Framework.Scenes get { return m_parts.Count; } } + protected Quaternion m_rotation = Quaternion.Identity; + + public virtual Quaternion Rotation + { + get { return m_rotation; } + set { m_rotation = value; } + } + public Quaternion GroupRotation { get { return m_rootPart.RotationOffset; } -- cgit v1.1 From d5c18f6149e26f9ba364339c01e7c8a78ca24d07 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sat, 14 Nov 2009 14:14:08 -0800 Subject: Make GroupRootUpdate be a terse update. This method is not used by opensim (it should), but it's used by external modules. --- OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs') diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index f938472..bcc9b37 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs @@ -1967,12 +1967,12 @@ namespace OpenSim.Region.Framework.Scenes /// Note: this may not be cused by opensim (it probably should) but it's used by /// external modules. /// - public void SendGroupRootUpdate() + public void SendGroupRootTerseUpdate() { if (IsDeleted) return; - RootPart.SendFullUpdateToAllClients(); + RootPart.SendTerseUpdateToAllClients(); } public void QueueForUpdateCheck() -- cgit v1.1