diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 42 |
1 files changed, 27 insertions, 15 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index 6a10618..be8a6c9 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | |||
@@ -373,6 +373,13 @@ namespace OpenSim.Region.Framework.Scenes | |||
373 | #region Constructors | 373 | #region Constructors |
374 | 374 | ||
375 | /// <summary> | 375 | /// <summary> |
376 | /// Constructor | ||
377 | /// </summary> | ||
378 | public SceneObjectGroup() | ||
379 | { | ||
380 | } | ||
381 | |||
382 | /// <summary> | ||
376 | /// This constructor creates a SceneObjectGroup using a pre-existing SceneObjectPart. | 383 | /// This constructor creates a SceneObjectGroup using a pre-existing SceneObjectPart. |
377 | /// The original SceneObjectPart will be used rather than a copy, preserving | 384 | /// The original SceneObjectPart will be used rather than a copy, preserving |
378 | /// its existing localID and UUID. | 385 | /// its existing localID and UUID. |
@@ -2958,8 +2965,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
2958 | /// | 2965 | /// |
2959 | /// </summary> | 2966 | /// </summary> |
2960 | /// <param name="rot"></param> | 2967 | /// <param name="rot"></param> |
2961 | public void UpdateGroupRotation(Quaternion rot) | 2968 | public void UpdateGroupRotationR(Quaternion rot) |
2962 | { | 2969 | { |
2970 | |||
2963 | m_rootPart.UpdateRotation(rot); | 2971 | m_rootPart.UpdateRotation(rot); |
2964 | if (m_rootPart.PhysActor != null) | 2972 | if (m_rootPart.PhysActor != null) |
2965 | { | 2973 | { |
@@ -2976,7 +2984,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2976 | /// </summary> | 2984 | /// </summary> |
2977 | /// <param name="pos"></param> | 2985 | /// <param name="pos"></param> |
2978 | /// <param name="rot"></param> | 2986 | /// <param name="rot"></param> |
2979 | public void UpdateGroupRotation(Vector3 pos, Quaternion rot) | 2987 | public void UpdateGroupRotationPR(Vector3 pos, Quaternion rot) |
2980 | { | 2988 | { |
2981 | m_rootPart.UpdateRotation(rot); | 2989 | m_rootPart.UpdateRotation(rot); |
2982 | if (m_rootPart.PhysActor != null) | 2990 | if (m_rootPart.PhysActor != null) |
@@ -3084,22 +3092,26 @@ namespace OpenSim.Region.Framework.Scenes | |||
3084 | int yaxis = 4; | 3092 | int yaxis = 4; |
3085 | int zaxis = 8; | 3093 | int zaxis = 8; |
3086 | 3094 | ||
3087 | setX = ((axis & xaxis) != 0) ? true : false; | 3095 | if (m_rootPart != null) |
3088 | setY = ((axis & yaxis) != 0) ? true : false; | 3096 | { |
3089 | setZ = ((axis & zaxis) != 0) ? true : false; | 3097 | setX = ((axis & xaxis) != 0) ? true : false; |
3098 | setY = ((axis & yaxis) != 0) ? true : false; | ||
3099 | setZ = ((axis & zaxis) != 0) ? true : false; | ||
3090 | 3100 | ||
3091 | float setval = (rotate10 > 0) ? 1f : 0f; | 3101 | float setval = (rotate10 > 0) ? 1f : 0f; |
3092 | 3102 | ||
3093 | if (setX) | 3103 | if (setX) |
3094 | m_rootPart.RotationAxis.X = setval; | 3104 | m_rootPart.RotationAxis.X = setval; |
3095 | if (setY) | 3105 | if (setY) |
3096 | m_rootPart.RotationAxis.Y = setval; | 3106 | m_rootPart.RotationAxis.Y = setval; |
3097 | if (setZ) | 3107 | if (setZ) |
3098 | m_rootPart.RotationAxis.Z = setval; | 3108 | m_rootPart.RotationAxis.Z = setval; |
3109 | |||
3110 | if (setX || setY || setZ) | ||
3111 | { | ||
3112 | m_rootPart.SetPhysicsAxisRotation(); | ||
3113 | } | ||
3099 | 3114 | ||
3100 | if (setX || setY || setZ) | ||
3101 | { | ||
3102 | m_rootPart.SetPhysicsAxisRotation(); | ||
3103 | } | 3115 | } |
3104 | } | 3116 | } |
3105 | 3117 | ||