aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2010-07-17 00:27:52 +0100
committerJustin Clark-Casey (justincc)2010-07-17 00:27:52 +0100
commite05f01e70f233d2b747ba0741bc91cafa0869be7 (patch)
tree043b6bdbd6be9e2e93cb83b74131a214feec8ed6 /OpenSim
parentFix bugs in llRot2Euler() (diff)
parentFixes mantis #4872. Port for GridInfo was wrong in Robust.HG.ini.example (diff)
downloadopensim-SC-e05f01e70f233d2b747ba0741bc91cafa0869be7.zip
opensim-SC-e05f01e70f233d2b747ba0741bc91cafa0869be7.tar.gz
opensim-SC-e05f01e70f233d2b747ba0741bc91cafa0869be7.tar.bz2
opensim-SC-e05f01e70f233d2b747ba0741bc91cafa0869be7.tar.xz
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs24
1 files changed, 19 insertions, 5 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
index 527934d..ff3036a 100644
--- a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
@@ -140,19 +140,33 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
140 group.SetAttachmentPoint((byte)AttachmentPt); 140 group.SetAttachmentPoint((byte)AttachmentPt);
141 group.AbsolutePosition = attachPos; 141 group.AbsolutePosition = attachPos;
142 142
143 // Saves and gets itemID 143 // Remove any previous attachments
144 UUID itemId; 144 ScenePresence sp = m_scene.GetScenePresence(remoteClient.AgentId);
145 UUID itemID = UUID.Zero;
146 if (sp != null)
147 {
148 foreach(SceneObjectGroup grp in sp.Attachments)
149 {
150 if (grp.GetAttachmentPoint() == (byte)AttachmentPt)
151 {
152 itemID = grp.GetFromItemID();
153 break;
154 }
155 }
156 if (itemID != UUID.Zero)
157 DetachSingleAttachmentToInv(itemID, remoteClient);
158 }
145 159
146 if (group.GetFromItemID() == UUID.Zero) 160 if (group.GetFromItemID() == UUID.Zero)
147 { 161 {
148 m_scene.attachObjectAssetStore(remoteClient, group, remoteClient.AgentId, out itemId); 162 m_scene.attachObjectAssetStore(remoteClient, group, remoteClient.AgentId, out itemID);
149 } 163 }
150 else 164 else
151 { 165 {
152 itemId = group.GetFromItemID(); 166 itemID = group.GetFromItemID();
153 } 167 }
154 168
155 SetAttachmentInventoryStatus(remoteClient, AttachmentPt, itemId, group); 169 SetAttachmentInventoryStatus(remoteClient, AttachmentPt, itemID, group);
156 170
157 group.AttachToAgent(remoteClient.AgentId, AttachmentPt, attachPos, silent); 171 group.AttachToAgent(remoteClient.AgentId, AttachmentPt, attachPos, silent);
158 172