diff options
author | John Hurliman | 2009-11-02 15:09:07 -0800 |
---|---|---|
committer | John Hurliman | 2009-11-02 15:09:07 -0800 |
commit | 19279450537ffffc71bf67f1efb4b50b4c7d5065 (patch) | |
tree | faad681efd044681acb77a5a8cb0900d0ea628db | |
parent | Removing Console.WriteLine()s that were brought in with the revert (diff) | |
download | opensim-SC_OLD-19279450537ffffc71bf67f1efb4b50b4c7d5065.zip opensim-SC_OLD-19279450537ffffc71bf67f1efb4b50b4c7d5065.tar.gz opensim-SC_OLD-19279450537ffffc71bf67f1efb4b50b4c7d5065.tar.bz2 opensim-SC_OLD-19279450537ffffc71bf67f1efb4b50b4c7d5065.tar.xz |
Another race condition fix in SceneObjectGroup
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 18 |
1 files changed, 11 insertions, 7 deletions
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 | |||
2946 | /// <param name="rot"></param> | 2946 | /// <param name="rot"></param> |
2947 | public void UpdateGroupRotationR(Quaternion rot) | 2947 | public void UpdateGroupRotationR(Quaternion rot) |
2948 | { | 2948 | { |
2949 | |||
2950 | m_rootPart.UpdateRotation(rot); | 2949 | m_rootPart.UpdateRotation(rot); |
2951 | if (m_rootPart.PhysActor != null) | 2950 | |
2951 | PhysicsActor actor = m_rootPart.PhysActor; | ||
2952 | if (actor != null) | ||
2952 | { | 2953 | { |
2953 | m_rootPart.PhysActor.Orientation = m_rootPart.RotationOffset; | 2954 | actor.Orientation = m_rootPart.RotationOffset; |
2954 | m_scene.PhysicsScene.AddPhysicsActorTaint(m_rootPart.PhysActor); | 2955 | m_scene.PhysicsScene.AddPhysicsActorTaint(actor); |
2955 | } | 2956 | } |
2956 | 2957 | ||
2957 | HasGroupChanged = true; | 2958 | HasGroupChanged = true; |
@@ -2966,11 +2967,14 @@ namespace OpenSim.Region.Framework.Scenes | |||
2966 | public void UpdateGroupRotationPR(Vector3 pos, Quaternion rot) | 2967 | public void UpdateGroupRotationPR(Vector3 pos, Quaternion rot) |
2967 | { | 2968 | { |
2968 | m_rootPart.UpdateRotation(rot); | 2969 | m_rootPart.UpdateRotation(rot); |
2969 | if (m_rootPart.PhysActor != null) | 2970 | |
2971 | PhysicsActor actor = m_rootPart.PhysActor; | ||
2972 | if (actor != null) | ||
2970 | { | 2973 | { |
2971 | m_rootPart.PhysActor.Orientation = m_rootPart.RotationOffset; | 2974 | actor.Orientation = m_rootPart.RotationOffset; |
2972 | m_scene.PhysicsScene.AddPhysicsActorTaint(m_rootPart.PhysActor); | 2975 | m_scene.PhysicsScene.AddPhysicsActorTaint(actor); |
2973 | } | 2976 | } |
2977 | |||
2974 | AbsolutePosition = pos; | 2978 | AbsolutePosition = pos; |
2975 | 2979 | ||
2976 | HasGroupChanged = true; | 2980 | HasGroupChanged = true; |