diff options
author | UbitUmarov | 2018-12-11 00:42:02 +0000 |
---|---|---|
committer | UbitUmarov | 2018-12-11 00:42:02 +0000 |
commit | 1610595697ea2169e5106b545df222b9a29ceabe (patch) | |
tree | 4b93ad1468d5f57a835f4f091530e9ef4a9f7e1b /OpenSim/Region/ScriptEngine/YEngine/XMRInstCtor.cs | |
parent | Yengine actually loose the bas state file (diff) | |
download | opensim-SC-1610595697ea2169e5106b545df222b9a29ceabe.zip opensim-SC-1610595697ea2169e5106b545df222b9a29ceabe.tar.gz opensim-SC-1610595697ea2169e5106b545df222b9a29ceabe.tar.bz2 opensim-SC-1610595697ea2169e5106b545df222b9a29ceabe.tar.xz |
Yengine reset global variables possible damaged by bad state file
Diffstat (limited to 'OpenSim/Region/ScriptEngine/YEngine/XMRInstCtor.cs')
-rw-r--r-- | OpenSim/Region/ScriptEngine/YEngine/XMRInstCtor.cs | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/OpenSim/Region/ScriptEngine/YEngine/XMRInstCtor.cs b/OpenSim/Region/ScriptEngine/YEngine/XMRInstCtor.cs index fd60946..b140453 100644 --- a/OpenSim/Region/ScriptEngine/YEngine/XMRInstCtor.cs +++ b/OpenSim/Region/ScriptEngine/YEngine/XMRInstCtor.cs | |||
@@ -401,6 +401,7 @@ namespace OpenSim.Region.ScriptEngine.Yengine | |||
401 | eventCode = ScriptEventCode.None; // not processing any event | 401 | eventCode = ScriptEventCode.None; // not processing any event |
402 | 402 | ||
403 | // default state_entry() must initialize global variables | 403 | // default state_entry() must initialize global variables |
404 | glblVars.AllocVarArrays(m_ObjCode.glblSizes); // reset globals | ||
404 | doGblInit = true; | 405 | doGblInit = true; |
405 | stateCode = 0; | 406 | stateCode = 0; |
406 | 407 | ||
@@ -526,11 +527,6 @@ namespace OpenSim.Region.ScriptEngine.Yengine | |||
526 | XmlElement doGblInitN = (XmlElement)scriptStateN.SelectSingleNode("DoGblInit"); | 527 | XmlElement doGblInitN = (XmlElement)scriptStateN.SelectSingleNode("DoGblInit"); |
527 | doGblInit = bool.Parse(doGblInitN.InnerText); | 528 | doGblInit = bool.Parse(doGblInitN.InnerText); |
528 | 529 | ||
529 | XmlElement permissionsN = (XmlElement)scriptStateN.SelectSingleNode("Permissions"); | ||
530 | m_Item.PermsGranter = new UUID(permissionsN.GetAttribute("granter")); | ||
531 | m_Item.PermsMask = Convert.ToInt32(permissionsN.GetAttribute("mask")); | ||
532 | m_Part.Inventory.UpdateInventoryItem(m_Item, false, false); | ||
533 | |||
534 | // get values used by stuff like llDetectedGrab, etc. | 530 | // get values used by stuff like llDetectedGrab, etc. |
535 | DetectParams[] detParams = RestoreDetectParams(scriptStateN.SelectSingleNode("DetectArray")); | 531 | DetectParams[] detParams = RestoreDetectParams(scriptStateN.SelectSingleNode("DetectArray")); |
536 | 532 | ||
@@ -552,9 +548,14 @@ namespace OpenSim.Region.ScriptEngine.Yengine | |||
552 | MigrateInEventHandler(ms); | 548 | MigrateInEventHandler(ms); |
553 | } | 549 | } |
554 | 550 | ||
551 | XmlElement permissionsN = (XmlElement)scriptStateN.SelectSingleNode("Permissions"); | ||
552 | m_Item.PermsGranter = new UUID(permissionsN.GetAttribute("granter")); | ||
553 | m_Item.PermsMask = Convert.ToInt32(permissionsN.GetAttribute("mask")); | ||
554 | m_Part.Inventory.UpdateInventoryItem(m_Item, false, false); | ||
555 | |||
555 | // Restore event queues, preserving any events that queued | 556 | // Restore event queues, preserving any events that queued |
556 | // whilst we were restoring the state | 557 | // whilst we were restoring the state |
557 | lock(m_QueueLock) | 558 | lock (m_QueueLock) |
558 | { | 559 | { |
559 | m_DetectParams = detParams; | 560 | m_DetectParams = detParams; |
560 | foreach(EventParams evt in m_EventQueue) | 561 | foreach(EventParams evt in m_EventQueue) |