diff options
-rw-r--r-- | OpenSim/Region/Framework/Interfaces/IScriptModule.cs | 2 | ||||
-rw-r--r-- | OpenSim/Region/ScriptEngine/XEngine/XEngine.cs | 13 |
2 files changed, 11 insertions, 4 deletions
diff --git a/OpenSim/Region/Framework/Interfaces/IScriptModule.cs b/OpenSim/Region/Framework/Interfaces/IScriptModule.cs index 4a3c634..641e226 100644 --- a/OpenSim/Region/Framework/Interfaces/IScriptModule.cs +++ b/OpenSim/Region/Framework/Interfaces/IScriptModule.cs | |||
@@ -52,5 +52,7 @@ namespace OpenSim.Region.Framework.Interfaces | |||
52 | ArrayList GetScriptErrors(UUID itemID); | 52 | ArrayList GetScriptErrors(UUID itemID); |
53 | 53 | ||
54 | bool HasScript(UUID itemID, out bool running); | 54 | bool HasScript(UUID itemID, out bool running); |
55 | |||
56 | void SaveAllState(); | ||
55 | } | 57 | } |
56 | } | 58 | } |
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 | ||