diff options
author | Melanie | 2012-08-20 15:35:06 +0200 |
---|---|---|
committer | Melanie | 2012-08-20 15:35:06 +0200 |
commit | f71ed7eb79091de370800362f716d214dd27b03a (patch) | |
tree | fcfccaa40e5558c18b0b0ebb486cebb152dd0f75 /OpenSim/Region/CoreModules | |
parent | Make the console output from the reigon console hookable (diff) | |
download | opensim-SC_OLD-f71ed7eb79091de370800362f716d214dd27b03a.zip opensim-SC_OLD-f71ed7eb79091de370800362f716d214dd27b03a.tar.gz opensim-SC_OLD-f71ed7eb79091de370800362f716d214dd27b03a.tar.bz2 opensim-SC_OLD-f71ed7eb79091de370800362f716d214dd27b03a.tar.xz |
Fix scripted detach of temp attachments
Diffstat (limited to 'OpenSim/Region/CoreModules')
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs index 88ca9db..951afd7 100644 --- a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs | |||
@@ -526,10 +526,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments | |||
526 | 526 | ||
527 | public void DetachSingleAttachmentToInv(IScenePresence sp, SceneObjectGroup so) | 527 | public void DetachSingleAttachmentToInv(IScenePresence sp, SceneObjectGroup so) |
528 | { | 528 | { |
529 | // As per Linden spec, detach (take) is disabled for temp attachs | ||
530 | if (so.FromItemID == UUID.Zero) | ||
531 | return; | ||
532 | |||
533 | lock (sp.AttachmentsSyncLock) | 529 | lock (sp.AttachmentsSyncLock) |
534 | { | 530 | { |
535 | // Save avatar attachment information | 531 | // Save avatar attachment information |
@@ -1050,7 +1046,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments | |||
1050 | ScenePresence sp = m_scene.GetScenePresence(remoteClient.AgentId); | 1046 | ScenePresence sp = m_scene.GetScenePresence(remoteClient.AgentId); |
1051 | SceneObjectGroup group = m_scene.GetGroupByPrim(objectLocalID); | 1047 | SceneObjectGroup group = m_scene.GetGroupByPrim(objectLocalID); |
1052 | 1048 | ||
1053 | if (sp != null && group != null) | 1049 | if (sp != null && group != null && group.FromItemID != UUID.Zero) |
1054 | DetachSingleAttachmentToInv(sp, group); | 1050 | DetachSingleAttachmentToInv(sp, group); |
1055 | } | 1051 | } |
1056 | 1052 | ||
@@ -1068,7 +1064,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments | |||
1068 | 1064 | ||
1069 | foreach (SceneObjectGroup group in attachments) | 1065 | foreach (SceneObjectGroup group in attachments) |
1070 | { | 1066 | { |
1071 | if (group.FromItemID == itemID) | 1067 | if (group.FromItemID == itemID && group.FromItemID != UUID.Zero) |
1072 | { | 1068 | { |
1073 | DetachSingleAttachmentToInv(sp, group); | 1069 | DetachSingleAttachmentToInv(sp, group); |
1074 | return; | 1070 | return; |