mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 00:46:02 +08:00
Fix regression where the stored state of every second script in an object rezzed from inventory (e.g. attachments) was no longer loaded.
Likely a regression since f132f642 (2014-08-28)
Relates to http://opensimulator.org/mantis/view.php?id=7278
This commit is contained in:
@@ -400,6 +400,10 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
|
||||
private UUID RestoreSavedScriptState(UUID loadedID, UUID oldID, UUID newID)
|
||||
{
|
||||
// m_log.DebugFormat(
|
||||
// "[PRIM INVENTORY]: Restoring scripted state for item {0}, oldID {1}, loadedID {2}",
|
||||
// newID, oldID, loadedID);
|
||||
|
||||
IScriptModule[] engines = m_part.ParentGroup.Scene.RequestModuleInterfaces<IScriptModule>();
|
||||
if (engines.Length == 0) // No engine at all
|
||||
return oldID;
|
||||
@@ -412,7 +416,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
XmlDocument doc = new XmlDocument();
|
||||
|
||||
doc.LoadXml(m_part.ParentGroup.m_savedScriptState[stateID]);
|
||||
|
||||
|
||||
////////// CRUFT WARNING ///////////////////////////////////
|
||||
//
|
||||
// Old objects will have <ScriptState><State> ...
|
||||
@@ -442,6 +446,8 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
// This created document has only the minimun data
|
||||
// necessary for XEngine to parse it successfully
|
||||
|
||||
// m_log.DebugFormat("[PRIM INVENTORY]: Adding legacy state {0} in {1}", stateID, newID);
|
||||
|
||||
m_part.ParentGroup.m_savedScriptState[stateID] = newDoc.OuterXml;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user