aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine
diff options
context:
space:
mode:
authorMelanie2011-05-24 03:17:12 +0100
committerMelanie2011-05-24 03:17:12 +0100
commit61d4291da56e18c7777adebbcfce2c092a2d9a69 (patch)
tree6eecf2c08f1c900ed1534af9726086e0409aff90 /OpenSim/Region/ScriptEngine
parentAdd an event for an orderly region shutdown that fires once per region before (diff)
downloadopensim-SC_OLD-61d4291da56e18c7777adebbcfce2c092a2d9a69.zip
opensim-SC_OLD-61d4291da56e18c7777adebbcfce2c092a2d9a69.tar.gz
opensim-SC_OLD-61d4291da56e18c7777adebbcfce2c092a2d9a69.tar.bz2
opensim-SC_OLD-61d4291da56e18c7777adebbcfce2c092a2d9a69.tar.xz
Create a method to force the script engine to save state from outside
Diffstat (limited to 'OpenSim/Region/ScriptEngine')
-rw-r--r--OpenSim/Region/ScriptEngine/XEngine/XEngine.cs13
1 files changed, 9 insertions, 4 deletions
diff --git a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
index 97ab411..d253c6a 100644
--- a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
+++ b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
@@ -393,11 +393,8 @@ namespace OpenSim.Region.ScriptEngine.XEngine
393 return 0; 393 return 0;
394 } 394 }
395 395
396 public object DoMaintenance(object p) 396 public void SaveAllState()
397 { 397 {
398 object[] parms = (object[])p;
399 int sleepTime = (int)parms[0];
400
401 foreach (IScriptInstance inst in m_Scripts.Values) 398 foreach (IScriptInstance inst in m_Scripts.Values)
402 { 399 {
403 if (inst.EventTime() > m_EventLimit) 400 if (inst.EventTime() > m_EventLimit)
@@ -407,6 +404,14 @@ namespace OpenSim.Region.ScriptEngine.XEngine
407 inst.Start(); 404 inst.Start();
408 } 405 }
409 } 406 }
407 }
408
409 public object DoMaintenance(object p)
410 {
411 object[] parms = (object[])p;
412 int sleepTime = (int)parms[0];
413
414 SaveAllState();
410 415
411 System.Threading.Thread.Sleep(sleepTime); 416 System.Threading.Thread.Sleep(sleepTime);
412 417