diff options
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Region/ClientStack/ClientView.PacketHandlers.cs | 4 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs | 8 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/SceneObjectPart.cs | 3 |
3 files changed, 9 insertions, 6 deletions
diff --git a/OpenSim/Region/ClientStack/ClientView.PacketHandlers.cs b/OpenSim/Region/ClientStack/ClientView.PacketHandlers.cs index 09a4d0f..99b84ff 100644 --- a/OpenSim/Region/ClientStack/ClientView.PacketHandlers.cs +++ b/OpenSim/Region/ClientStack/ClientView.PacketHandlers.cs | |||
@@ -109,7 +109,7 @@ namespace OpenSim.Region.ClientStack | |||
109 | if (OnUpdatePrimSingleRotation != null) | 109 | if (OnUpdatePrimSingleRotation != null) |
110 | { | 110 | { |
111 | LLQuaternion rot = new LLQuaternion(multipleupdate.ObjectData[i].Data, 0, true); | 111 | LLQuaternion rot = new LLQuaternion(multipleupdate.ObjectData[i].Data, 0, true); |
112 | // Console.WriteLine("new rotation is " + rot.X + " , " + rot.Y + " , " + rot.Z + " , " + rot.W); | 112 | //System.Console.WriteLine("new tab rotation is " + rot.X + " , " + rot.Y + " , " + rot.Z + " , " + rot.W); |
113 | OnUpdatePrimSingleRotation(multipleupdate.ObjectData[i].ObjectLocalID, rot, this); | 113 | OnUpdatePrimSingleRotation(multipleupdate.ObjectData[i].ObjectLocalID, rot, this); |
114 | } | 114 | } |
115 | } | 115 | } |
@@ -118,7 +118,7 @@ namespace OpenSim.Region.ClientStack | |||
118 | if (OnUpdatePrimSingleRotation != null) | 118 | if (OnUpdatePrimSingleRotation != null) |
119 | { | 119 | { |
120 | libsecondlife.LLQuaternion rot = new LLQuaternion(multipleupdate.ObjectData[i].Data, 12, true); | 120 | libsecondlife.LLQuaternion rot = new LLQuaternion(multipleupdate.ObjectData[i].Data, 12, true); |
121 | // Console.WriteLine("new rotation is " + rot.X + " , " + rot.Y + " , " + rot.Z + " , " + rot.W); | 121 | //System.Console.WriteLine("new mouse rotation is " + rot.X + " , " + rot.Y + " , " + rot.Z + " , " + rot.W); |
122 | OnUpdatePrimSingleRotation(multipleupdate.ObjectData[i].ObjectLocalID, rot, this); | 122 | OnUpdatePrimSingleRotation(multipleupdate.ObjectData[i].ObjectLocalID, rot, this); |
123 | } | 123 | } |
124 | } | 124 | } |
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs index aa33d03..b3e3fe3 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs | |||
@@ -897,13 +897,14 @@ namespace OpenSim.Region.Environment.Scenes | |||
897 | /// <param name="rot"></param> | 897 | /// <param name="rot"></param> |
898 | private void UpdateRootRotation(LLQuaternion rot) | 898 | private void UpdateRootRotation(LLQuaternion rot) |
899 | { | 899 | { |
900 | Axiom.Math.Quaternion axRot = new Quaternion(rot.W, rot.X, rot.Y, rot.Z); | ||
901 | Axiom.Math.Quaternion oldParentRot = new Quaternion(this.m_rootPart.RotationOffset.W, this.m_rootPart.RotationOffset.X, this.m_rootPart.RotationOffset.Y, this.m_rootPart.RotationOffset.Z); | ||
902 | |||
900 | this.m_rootPart.UpdateRotation(rot); | 903 | this.m_rootPart.UpdateRotation(rot); |
901 | if (m_rootPart.PhysActor != null) | 904 | if (m_rootPart.PhysActor != null) |
902 | { | 905 | { |
903 | m_rootPart.PhysActor.Orientation = new Quaternion(m_rootPart.RotationOffset.W, m_rootPart.RotationOffset.X, m_rootPart.RotationOffset.Y, m_rootPart.RotationOffset.Z); | 906 | m_rootPart.PhysActor.Orientation = new Quaternion(m_rootPart.RotationOffset.W, m_rootPart.RotationOffset.X, m_rootPart.RotationOffset.Y, m_rootPart.RotationOffset.Z); |
904 | } | 907 | } |
905 | Axiom.Math.Quaternion axRot = new Quaternion(rot.W, rot.X, rot.Y, rot.Z); | ||
906 | Axiom.Math.Quaternion oldParentRot = new Quaternion(this.m_rootPart.RotationOffset.W, this.m_rootPart.RotationOffset.X, this.m_rootPart.RotationOffset.Y, this.m_rootPart.RotationOffset.Z); | ||
907 | 908 | ||
908 | foreach (SceneObjectPart prim in this.m_parts.Values) | 909 | foreach (SceneObjectPart prim in this.m_parts.Values) |
909 | { | 910 | { |
@@ -916,7 +917,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
916 | Axiom.Math.Quaternion primsRot = new Quaternion(prim.RotationOffset.W, prim.RotationOffset.X, prim.RotationOffset.Y, prim.RotationOffset.Z); | 917 | Axiom.Math.Quaternion primsRot = new Quaternion(prim.RotationOffset.W, prim.RotationOffset.X, prim.RotationOffset.Y, prim.RotationOffset.Z); |
917 | Axiom.Math.Quaternion newRot = oldParentRot * primsRot; | 918 | Axiom.Math.Quaternion newRot = oldParentRot * primsRot; |
918 | newRot = axRot.Inverse() * newRot; | 919 | newRot = axRot.Inverse() * newRot; |
919 | prim.RotationOffset = new LLQuaternion(newRot.w, newRot.x, newRot.y, newRot.z); | 920 | prim.RotationOffset = new LLQuaternion(newRot.x, newRot.y, newRot.z, newRot.w); |
921 | prim.ScheduleTerseUpdate(); | ||
920 | } | 922 | } |
921 | } | 923 | } |
922 | this.m_rootPart.ScheduleTerseUpdate(); | 924 | this.m_rootPart.ScheduleTerseUpdate(); |
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs index e32c196..b77da3a 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs | |||
@@ -244,7 +244,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
244 | m_folderID = LLUUID.Random(); | 244 | m_folderID = LLUUID.Random(); |
245 | 245 | ||
246 | m_flags = 0; | 246 | m_flags = 0; |
247 | m_flags |= LLObject.ObjectFlags.ObjectModify | | 247 | m_flags |= LLObject.ObjectFlags.Physics | |
248 | LLObject.ObjectFlags.ObjectModify | | ||
248 | LLObject.ObjectFlags.ObjectCopy | | 249 | LLObject.ObjectFlags.ObjectCopy | |
249 | LLObject.ObjectFlags.ObjectYouOwner | | 250 | LLObject.ObjectFlags.ObjectYouOwner | |
250 | LLObject.ObjectFlags.Touch | | 251 | LLObject.ObjectFlags.Touch | |