aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/YEngine/XMRInstCtor.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ScriptEngine/YEngine/XMRInstCtor.cs')
-rw-r--r--OpenSim/Region/ScriptEngine/YEngine/XMRInstCtor.cs13
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)