diff options
author | Melanie | 2012-08-20 15:35:06 +0200 |
---|---|---|
committer | Melanie | 2012-08-20 15:59:38 +0100 |
commit | 9aec62f0ac7ce0e074ee77e687d26c5414190162 (patch) | |
tree | f30f10120f92a5cf1886aee8fd7686f4a432839c | |
parent | Fix llDialog responses so that they can be heard throughout the region. This ... (diff) | |
download | opensim-SC_OLD-9aec62f0ac7ce0e074ee77e687d26c5414190162.zip opensim-SC_OLD-9aec62f0ac7ce0e074ee77e687d26c5414190162.tar.gz opensim-SC_OLD-9aec62f0ac7ce0e074ee77e687d26c5414190162.tar.bz2 opensim-SC_OLD-9aec62f0ac7ce0e074ee77e687d26c5414190162.tar.xz |
Fix scripted detach of temp attachments
-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 f107be1..d6ad07e 100644 --- a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs | |||
@@ -458,10 +458,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments | |||
458 | 458 | ||
459 | public void DetachSingleAttachmentToInv(IScenePresence sp, SceneObjectGroup so) | 459 | public void DetachSingleAttachmentToInv(IScenePresence sp, SceneObjectGroup so) |
460 | { | 460 | { |
461 | // As per Linden spec, detach (take) is disabled for temp attachs | ||
462 | if (so.FromItemID == UUID.Zero) | ||
463 | return; | ||
464 | |||
465 | lock (sp.AttachmentsSyncLock) | 461 | lock (sp.AttachmentsSyncLock) |
466 | { | 462 | { |
467 | // Save avatar attachment information | 463 | // Save avatar attachment information |
@@ -976,7 +972,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments | |||
976 | ScenePresence sp = m_scene.GetScenePresence(remoteClient.AgentId); | 972 | ScenePresence sp = m_scene.GetScenePresence(remoteClient.AgentId); |
977 | SceneObjectGroup group = m_scene.GetGroupByPrim(objectLocalID); | 973 | SceneObjectGroup group = m_scene.GetGroupByPrim(objectLocalID); |
978 | 974 | ||
979 | if (sp != null && group != null) | 975 | if (sp != null && group != null && group.FromItemID != UUID.Zero) |
980 | DetachSingleAttachmentToInv(sp, group); | 976 | DetachSingleAttachmentToInv(sp, group); |
981 | } | 977 | } |
982 | 978 | ||
@@ -994,7 +990,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments | |||
994 | 990 | ||
995 | foreach (SceneObjectGroup group in attachments) | 991 | foreach (SceneObjectGroup group in attachments) |
996 | { | 992 | { |
997 | if (group.FromItemID == itemID) | 993 | if (group.FromItemID == itemID && group.FromItemID != UUID.Zero) |
998 | { | 994 | { |
999 | DetachSingleAttachmentToInv(sp, group); | 995 | DetachSingleAttachmentToInv(sp, group); |
1000 | return; | 996 | return; |