aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/XEngine
diff options
context:
space:
mode:
authorMelanie2011-05-24 02:40:59 +0200
committerMelanie2011-05-24 02:40:59 +0200
commitd5841e07c2063ea8ac6602f17b8c30ae10a319b8 (patch)
treea52c70915b30ad1a7b5c2cb2afa3c9832b4e337c /OpenSim/Region/ScriptEngine/XEngine
parentAdd an event for an orderly region shutdown that fires once per region before (diff)
downloadopensim-SC_OLD-d5841e07c2063ea8ac6602f17b8c30ae10a319b8.zip
opensim-SC_OLD-d5841e07c2063ea8ac6602f17b8c30ae10a319b8.tar.gz
opensim-SC_OLD-d5841e07c2063ea8ac6602f17b8c30ae10a319b8.tar.bz2
opensim-SC_OLD-d5841e07c2063ea8ac6602f17b8c30ae10a319b8.tar.xz
Create a method to force the script engine to save state from outside
Diffstat (limited to 'OpenSim/Region/ScriptEngine/XEngine')
-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 9a78a42..4f3432d 100644
--- a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
+++ b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
@@ -461,11 +461,8 @@ namespace OpenSim.Region.ScriptEngine.XEngine
461 return 0; 461 return 0;
462 } 462 }
463 463
464 public object DoMaintenance(object p) 464 public void SaveAllState()
465 { 465 {
466 object[] parms = (object[])p;
467 int sleepTime = (int)parms[0];
468
469 foreach (IScriptInstance inst in m_Scripts.Values) 466 foreach (IScriptInstance inst in m_Scripts.Values)
470 { 467 {
471 if (inst.EventTime() > m_EventLimit) 468 if (inst.EventTime() > m_EventLimit)
@@ -475,6 +472,14 @@ namespace OpenSim.Region.ScriptEngine.XEngine
475 inst.Start(); 472 inst.Start();
476 } 473 }
477 } 474 }
475 }
476
477 public object DoMaintenance(object p)
478 {
479 object[] parms = (object[])p;
480 int sleepTime = (int)parms[0];
481
482 SaveAllState();
478 483
479 System.Threading.Thread.Sleep(sleepTime); 484 System.Threading.Thread.Sleep(sleepTime);
480 485