aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.Inventory.cs7
-rw-r--r--OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs14
2 files changed, 21 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
index 69b5f43..4bebbe8 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
@@ -2230,6 +2230,13 @@ namespace OpenSim.Region.Framework.Scenes
2230 sourcePart.Inventory.RemoveInventoryItem(item.ItemID); 2230 sourcePart.Inventory.RemoveInventoryItem(item.ItemID);
2231 } 2231 }
2232 2232
2233
2234 if (group.IsAttachment == false && group.RootPart.Shape.State != 0)
2235 {
2236 group.RootPart.AttachedPos = group.AbsolutePosition;
2237 group.RootPart.Shape.LastAttachPoint = (byte)group.AttachmentPoint;
2238 }
2239
2233 group.FromPartID = sourcePart.UUID; 2240 group.FromPartID = sourcePart.UUID;
2234 AddNewSceneObject(group, true, pos, rot, vel); 2241 AddNewSceneObject(group, true, pos, rot, vel);
2235 2242
diff --git a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs
index 945745e..3ea936c 100644
--- a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs
+++ b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs
@@ -365,6 +365,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
365 m_SOPXmlProcessors.Add("CollisionSound", ProcessCollisionSound); 365 m_SOPXmlProcessors.Add("CollisionSound", ProcessCollisionSound);
366 m_SOPXmlProcessors.Add("CollisionSoundVolume", ProcessCollisionSoundVolume); 366 m_SOPXmlProcessors.Add("CollisionSoundVolume", ProcessCollisionSoundVolume);
367 m_SOPXmlProcessors.Add("MediaUrl", ProcessMediaUrl); 367 m_SOPXmlProcessors.Add("MediaUrl", ProcessMediaUrl);
368 m_SOPXmlProcessors.Add("AttachedPos", ProcessAttachedPos);
368 m_SOPXmlProcessors.Add("DynAttrs", ProcessDynAttrs); 369 m_SOPXmlProcessors.Add("DynAttrs", ProcessDynAttrs);
369 m_SOPXmlProcessors.Add("TextureAnimation", ProcessTextureAnimation); 370 m_SOPXmlProcessors.Add("TextureAnimation", ProcessTextureAnimation);
370 m_SOPXmlProcessors.Add("ParticleSystem", ProcessParticleSystem); 371 m_SOPXmlProcessors.Add("ParticleSystem", ProcessParticleSystem);
@@ -433,6 +434,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
433 m_ShapeXmlProcessors.Add("ProfileEnd", ProcessShpProfileEnd); 434 m_ShapeXmlProcessors.Add("ProfileEnd", ProcessShpProfileEnd);
434 m_ShapeXmlProcessors.Add("ProfileHollow", ProcessShpProfileHollow); 435 m_ShapeXmlProcessors.Add("ProfileHollow", ProcessShpProfileHollow);
435 m_ShapeXmlProcessors.Add("Scale", ProcessShpScale); 436 m_ShapeXmlProcessors.Add("Scale", ProcessShpScale);
437 m_ShapeXmlProcessors.Add("LastAttachPoint", ProcessShpLastAttach);
436 m_ShapeXmlProcessors.Add("State", ProcessShpState); 438 m_ShapeXmlProcessors.Add("State", ProcessShpState);
437 m_ShapeXmlProcessors.Add("ProfileShape", ProcessShpProfileShape); 439 m_ShapeXmlProcessors.Add("ProfileShape", ProcessShpProfileShape);
438 m_ShapeXmlProcessors.Add("HollowShape", ProcessShpHollowShape); 440 m_ShapeXmlProcessors.Add("HollowShape", ProcessShpHollowShape);
@@ -761,6 +763,11 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
761 obj.MediaUrl = reader.ReadElementContentAsString("MediaUrl", String.Empty); 763 obj.MediaUrl = reader.ReadElementContentAsString("MediaUrl", String.Empty);
762 } 764 }
763 765
766 private static void ProcessAttachedPos(SceneObjectPart obj, XmlTextReader reader)
767 {
768 obj.AttachedPos = Util.ReadVector(reader, "AttachedPos");
769 }
770
764 private static void ProcessDynAttrs(SceneObjectPart obj, XmlTextReader reader) 771 private static void ProcessDynAttrs(SceneObjectPart obj, XmlTextReader reader)
765 { 772 {
766 obj.DynAttrs.ReadXml(reader); 773 obj.DynAttrs.ReadXml(reader);
@@ -1043,6 +1050,11 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
1043 shp.State = (byte)reader.ReadElementContentAsInt("State", String.Empty); 1050 shp.State = (byte)reader.ReadElementContentAsInt("State", String.Empty);
1044 } 1051 }
1045 1052
1053 private static void ProcessShpLastAttach(PrimitiveBaseShape shp, XmlTextReader reader)
1054 {
1055 shp.LastAttachPoint = (byte)reader.ReadElementContentAsInt("LastAttachPoint", String.Empty);
1056 }
1057
1046 private static void ProcessShpProfileShape(PrimitiveBaseShape shp, XmlTextReader reader) 1058 private static void ProcessShpProfileShape(PrimitiveBaseShape shp, XmlTextReader reader)
1047 { 1059 {
1048 shp.ProfileShape = Util.ReadEnum<ProfileShape>(reader, "ProfileShape"); 1060 shp.ProfileShape = Util.ReadEnum<ProfileShape>(reader, "ProfileShape");
@@ -1289,6 +1301,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
1289 writer.WriteElementString("CollisionSoundVolume", sop.CollisionSoundVolume.ToString()); 1301 writer.WriteElementString("CollisionSoundVolume", sop.CollisionSoundVolume.ToString());
1290 if (sop.MediaUrl != null) 1302 if (sop.MediaUrl != null)
1291 writer.WriteElementString("MediaUrl", sop.MediaUrl.ToString()); 1303 writer.WriteElementString("MediaUrl", sop.MediaUrl.ToString());
1304 WriteVector(writer, "AttachedPos", sop.AttachedPos);
1292 1305
1293 if (sop.DynAttrs.CountNamespaces > 0) 1306 if (sop.DynAttrs.CountNamespaces > 0)
1294 { 1307 {
@@ -1471,6 +1484,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
1471 writer.WriteElementString("ProfileEnd", shp.ProfileEnd.ToString()); 1484 writer.WriteElementString("ProfileEnd", shp.ProfileEnd.ToString());
1472 writer.WriteElementString("ProfileHollow", shp.ProfileHollow.ToString()); 1485 writer.WriteElementString("ProfileHollow", shp.ProfileHollow.ToString());
1473 writer.WriteElementString("State", shp.State.ToString()); 1486 writer.WriteElementString("State", shp.State.ToString());
1487 writer.WriteElementString("LastAttachPoint", shp.LastAttachPoint.ToString());
1474 1488
1475 WriteFlags(writer, "ProfileShape", shp.ProfileShape.ToString(), options); 1489 WriteFlags(writer, "ProfileShape", shp.ProfileShape.ToString(), options);
1476 WriteFlags(writer, "HollowShape", shp.HollowShape.ToString(), options); 1490 WriteFlags(writer, "HollowShape", shp.HollowShape.ToString(), options);