Yengine reset global variables possible damaged by bad state file
parent
11b467cabf
commit
1610595697
|
@ -401,6 +401,7 @@ namespace OpenSim.Region.ScriptEngine.Yengine
|
|||
eventCode = ScriptEventCode.None; // not processing any event
|
||||
|
||||
// default state_entry() must initialize global variables
|
||||
glblVars.AllocVarArrays(m_ObjCode.glblSizes); // reset globals
|
||||
doGblInit = true;
|
||||
stateCode = 0;
|
||||
|
||||
|
@ -526,11 +527,6 @@ namespace OpenSim.Region.ScriptEngine.Yengine
|
|||
XmlElement doGblInitN = (XmlElement)scriptStateN.SelectSingleNode("DoGblInit");
|
||||
doGblInit = bool.Parse(doGblInitN.InnerText);
|
||||
|
||||
XmlElement permissionsN = (XmlElement)scriptStateN.SelectSingleNode("Permissions");
|
||||
m_Item.PermsGranter = new UUID(permissionsN.GetAttribute("granter"));
|
||||
m_Item.PermsMask = Convert.ToInt32(permissionsN.GetAttribute("mask"));
|
||||
m_Part.Inventory.UpdateInventoryItem(m_Item, false, false);
|
||||
|
||||
// get values used by stuff like llDetectedGrab, etc.
|
||||
DetectParams[] detParams = RestoreDetectParams(scriptStateN.SelectSingleNode("DetectArray"));
|
||||
|
||||
|
@ -552,6 +548,11 @@ namespace OpenSim.Region.ScriptEngine.Yengine
|
|||
MigrateInEventHandler(ms);
|
||||
}
|
||||
|
||||
XmlElement permissionsN = (XmlElement)scriptStateN.SelectSingleNode("Permissions");
|
||||
m_Item.PermsGranter = new UUID(permissionsN.GetAttribute("granter"));
|
||||
m_Item.PermsMask = Convert.ToInt32(permissionsN.GetAttribute("mask"));
|
||||
m_Part.Inventory.UpdateInventoryItem(m_Item, false, false);
|
||||
|
||||
// Restore event queues, preserving any events that queued
|
||||
// whilst we were restoring the state
|
||||
lock (m_QueueLock)
|
||||
|
|
Loading…
Reference in New Issue