aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework
diff options
context:
space:
mode:
authorDr Scofield2009-03-10 06:14:29 +0000
committerDr Scofield2009-03-10 06:14:29 +0000
commit973ba9c9b77bc59c0d379bee6d93e31f6ea855fb (patch)
treefab21132f5f7a8a739adaf086d50db7b5e64d066 /OpenSim/Region/Framework
parentFrom: Alan Webb <alan_webb@us.ibm.com> (diff)
downloadopensim-SC_OLD-973ba9c9b77bc59c0d379bee6d93e31f6ea855fb.zip
opensim-SC_OLD-973ba9c9b77bc59c0d379bee6d93e31f6ea855fb.tar.gz
opensim-SC_OLD-973ba9c9b77bc59c0d379bee6d93e31f6ea855fb.tar.bz2
opensim-SC_OLD-973ba9c9b77bc59c0d379bee6d93e31f6ea855fb.tar.xz
From: Alan Webb <alan_webb@us.ibm.com>
This commit fixes the attachment position problem described in OpenSim Mantis 2841 (and a couple of duplicate tickets).
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneGraph.cs17
1 files changed, 17 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
index ecce237..b167fd7 100644
--- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
@@ -1247,7 +1247,24 @@ namespace OpenSim.Region.Framework.Scenes
1247 // Vector3 oldPos = group.AbsolutePosition; 1247 // Vector3 oldPos = group.AbsolutePosition;
1248 if (group.IsAttachment || (group.RootPart.Shape.PCode == 9 && group.RootPart.Shape.State != 0)) 1248 if (group.IsAttachment || (group.RootPart.Shape.PCode == 9 && group.RootPart.Shape.State != 0))
1249 { 1249 {
1250
1251 // If this is an attachment, then we need to save the modified
1252 // object back into the avatar's inventory. First we save the
1253 // attachment point information, then we update the relative
1254 // positioning (which caused this method to get driven in the
1255 // first place. Then we have to mark the object as NOT an
1256 // attachment. This is necessary in order to correctly save
1257 // and retrieve GroupPosition information for the attachment.
1258 // Then we save the asset back into the appropriate inventory
1259 // entry. Finally, we restore the object's attachment status.
1260
1261 byte attachmentPoint = group.GetAttachmentPoint();
1250 group.UpdateGroupPosition(pos); 1262 group.UpdateGroupPosition(pos);
1263 group.RootPart.IsAttachment = false;
1264 group.AbsolutePosition = group.RootPart.AttachedPos;
1265 m_parentScene.updateKnownAsset(remoteClient, group, group.GetFromAssetID(), group.OwnerID);
1266 group.SetAttachmentPoint(attachmentPoint);
1267
1251 } 1268 }
1252 else 1269 else
1253 { 1270 {