aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorMelanie2012-05-02 00:32:28 +0200
committerMelanie2012-05-02 00:32:28 +0200
commite6e12c2d426355b40e40663b0868081ea8db16c8 (patch)
tree17bbf20252dabe02bc5d325ca4f0cf30d9aaa04f
parentMerge branch 'master' into careminster (diff)
parentPreserve attachment rotation on objects rezzed via a script. Makes toasters (diff)
downloadopensim-SC_OLD-e6e12c2d426355b40e40663b0868081ea8db16c8.zip
opensim-SC_OLD-e6e12c2d426355b40e40663b0868081ea8db16c8.tar.gz
opensim-SC_OLD-e6e12c2d426355b40e40663b0868081ea8db16c8.tar.bz2
opensim-SC_OLD-e6e12c2d426355b40e40663b0868081ea8db16c8.tar.xz
Merge branch 'avination'
-rw-r--r--OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs7
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs2
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPart.cs3
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs1
4 files changed, 12 insertions, 1 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs
index f41e89e..ee9961f 100644
--- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs
@@ -371,14 +371,19 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
371 : objectGroup.AbsolutePosition.Y, 371 : objectGroup.AbsolutePosition.Y,
372 objectGroup.AbsolutePosition.Z); 372 objectGroup.AbsolutePosition.Z);
373 373
374 Quaternion inventoryStoredRotation = objectGroup.GroupRotation;
374 originalPositions[objectGroup.UUID] = objectGroup.AbsolutePosition; 375 originalPositions[objectGroup.UUID] = objectGroup.AbsolutePosition;
375 376
376 // Restore attachment data after trip through the sim 377 // Restore attachment data after trip through the sim
377 if (objectGroup.RootPart.AttachPoint > 0) 378 if (objectGroup.RootPart.AttachPoint > 0)
379 {
378 inventoryStoredPosition = objectGroup.RootPart.AttachOffset; 380 inventoryStoredPosition = objectGroup.RootPart.AttachOffset;
381 inventoryStoredRotation = objectGroup.RootPart.AttachRotation;
382 }
379 objectGroup.RootPart.Shape.State = objectGroup.RootPart.AttachPoint; 383 objectGroup.RootPart.Shape.State = objectGroup.RootPart.AttachPoint;
380 384
381 objectGroup.AbsolutePosition = inventoryStoredPosition; 385 objectGroup.AbsolutePosition = inventoryStoredPosition;
386 objectGroup.RootPart.RotationOffset = inventoryStoredRotation;
382 387
383 // Make sure all bits but the ones we want are clear 388 // Make sure all bits but the ones we want are clear
384 // on take. 389 // on take.
@@ -768,6 +773,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
768 { 773 {
769 g.RootPart.AttachPoint = g.RootPart.Shape.State; 774 g.RootPart.AttachPoint = g.RootPart.Shape.State;
770 g.RootPart.AttachOffset = g.AbsolutePosition; 775 g.RootPart.AttachOffset = g.AbsolutePosition;
776 g.RootPart.AttachRotation = g.GroupRotation;
771 g.RootPart.Shape.State = 0; 777 g.RootPart.Shape.State = 0;
772 } 778 }
773 779
@@ -801,6 +807,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
801 SceneObjectGroup g = SceneObjectSerializer.FromOriginalXmlFormat(n.OuterXml); 807 SceneObjectGroup g = SceneObjectSerializer.FromOriginalXmlFormat(n.OuterXml);
802 g.RootPart.AttachPoint = g.RootPart.Shape.State; 808 g.RootPart.AttachPoint = g.RootPart.Shape.State;
803 g.RootPart.AttachOffset = g.AbsolutePosition; 809 g.RootPart.AttachOffset = g.AbsolutePosition;
810 g.RootPart.AttachRotation = g.GroupRotation;
804 g.RootPart.Shape.State = 0; 811 g.RootPart.Shape.State = 0;
805 812
806 objlist.Add(g); 813 objlist.Add(g);
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
index b5e1a52..f1657d9 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
@@ -3722,7 +3722,7 @@ namespace OpenSim.Region.Framework.Scenes
3722 } 3722 }
3723 if ((change & ObjectChangeType.Position) != 0) 3723 if ((change & ObjectChangeType.Position) != 0)
3724 { 3724 {
3725 group.AbsolutePosition = data.position; 3725 UpdateGroupPosition(data.position);
3726 updateType = updatetype.groupterse; 3726 updateType = updatetype.groupterse;
3727 } 3727 }
3728 else 3728 else
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index ffb86f3..843c426 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -197,6 +197,9 @@ namespace OpenSim.Region.Framework.Scenes
197 public Vector3 AttachOffset = Vector3.Zero; 197 public Vector3 AttachOffset = Vector3.Zero;
198 198
199 [XmlIgnore] 199 [XmlIgnore]
200 public Quaternion AttachRotation = Quaternion.Identity;
201
202 [XmlIgnore]
200 public int STATUS_ROTATE_X; 203 public int STATUS_ROTATE_X;
201 204
202 public int STATUS_ROTATE_Y; 205 public int STATUS_ROTATE_Y;
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
index 36cb09a..a190efe 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
@@ -801,6 +801,7 @@ namespace OpenSim.Region.Framework.Scenes
801 801
802 group.RootPart.AttachPoint = group.RootPart.Shape.State; 802 group.RootPart.AttachPoint = group.RootPart.Shape.State;
803 group.RootPart.AttachOffset = group.AbsolutePosition; 803 group.RootPart.AttachOffset = group.AbsolutePosition;
804 group.RootPart.AttachRotation = group.GroupRotation;
804 805
805 group.ResetIDs(); 806 group.ResetIDs();
806 807