diff options
author | Melanie | 2010-11-16 01:35:45 +0100 |
---|---|---|
committer | Melanie | 2010-11-16 01:35:45 +0100 |
commit | 7a9c57a81ec979564b089429bb93655912f823a2 (patch) | |
tree | fec2570cd04adae90e572ff605d37a41eacf5dea /OpenSim/Region/CoreModules/Avatar/Attachments | |
parent | Diva needs a spanking! Serializing OldItemID breaks script state (diff) | |
download | opensim-SC_OLD-7a9c57a81ec979564b089429bb93655912f823a2.zip opensim-SC_OLD-7a9c57a81ec979564b089429bb93655912f823a2.tar.gz opensim-SC_OLD-7a9c57a81ec979564b089429bb93655912f823a2.tar.bz2 opensim-SC_OLD-7a9c57a81ec979564b089429bb93655912f823a2.tar.xz |
When detaching a scripted item, always consider it modified. Script states
will have changed and for real usability, we need to save it. It bloats
assets, but that can't be avoided.
Diffstat (limited to 'OpenSim/Region/CoreModules/Avatar/Attachments')
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs index 6122cc2..929db21 100644 --- a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs | |||
@@ -527,10 +527,16 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments | |||
527 | /// <param name="grp"></param> | 527 | /// <param name="grp"></param> |
528 | /// <param name="itemID"></param> | 528 | /// <param name="itemID"></param> |
529 | /// <param name="agentID"></param> | 529 | /// <param name="agentID"></param> |
530 | protected void UpdateKnownItem(IClientAPI remoteClient, SceneObjectGroup grp, UUID itemID, UUID agentID) | 530 | public void UpdateKnownItem(IClientAPI remoteClient, SceneObjectGroup grp, UUID itemID, UUID agentID) |
531 | { | 531 | { |
532 | if (grp != null) | 532 | if (grp != null) |
533 | { | 533 | { |
534 | // If an item contains scripts, it's always changed. | ||
535 | // This ensures script state is saved on detach | ||
536 | foreach (SceneObjectPart p in grp.Parts) | ||
537 | if (p.Inventory.ContainsScripts()) | ||
538 | grp.HasGroupChanged = true; | ||
539 | |||
534 | if (!grp.HasGroupChanged) | 540 | if (!grp.HasGroupChanged) |
535 | { | 541 | { |
536 | m_log.WarnFormat("[ATTACHMENTS MODULE]: Save request for {0} which is unchanged", grp.UUID); | 542 | m_log.WarnFormat("[ATTACHMENTS MODULE]: Save request for {0} which is unchanged", grp.UUID); |