From 8f668ec88855868681c225e69f092502cf0959e8 Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Mon, 25 Apr 2016 20:02:11 +0200 Subject: Stop serializing and storing assets for objects that were never rezzed from inventory items. --- .../CoreModules/Avatar/Attachments/AttachmentsModule.cs | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'OpenSim/Region/CoreModules/Avatar/Attachments') diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs index 7380b63..3d90fa6 100644 --- a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs @@ -775,6 +775,18 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments return; } + // If this didn't come from inventory, it also shouldn't go there + // on detach. It's likely a temp attachment. + if (so.FromItemID != UUID.Zero) + { + sp.RemoveAttachment(so); + m_scene.DeleteSceneObject(so, false, false); + so.RemoveScriptInstances(true); + so.Clear(); + + return; + } + if (DebugLevel > 0) m_log.DebugFormat( "[ATTACHMENTS MODULE]: Detaching object {0} {1} (FromItemID {2}) for {3} in {4}", -- cgit v1.1