Bugfixes - Scripting works again
parent
3994a96783
commit
0fc6b2a429
|
@ -173,6 +173,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
|
|||
m_ScriptEngine = _ScriptEngine;
|
||||
|
||||
ReadConfig();
|
||||
AdjustNumberOfScriptThreads();
|
||||
}
|
||||
|
||||
public void ReadConfig()
|
||||
|
|
|
@ -131,6 +131,8 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
|
|||
long Last_ReReadConfigFilens = DateTime.Now.Ticks;
|
||||
int MaintenanceLoopTicks_ScriptLoadUnload_Count = 0;
|
||||
int MaintenanceLoopTicks_Other_Count = 0;
|
||||
bool MaintenanceLoopTicks_ScriptLoadUnload_ResetCount = false;
|
||||
bool MaintenanceLoopTicks_Other_ResetCount = false;
|
||||
|
||||
while (true)
|
||||
{
|
||||
|
@ -140,6 +142,18 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
|
|||
{
|
||||
System.Threading.Thread.Sleep(MaintenanceLoopms); // Sleep before next pass
|
||||
|
||||
// Reset counters?
|
||||
if (MaintenanceLoopTicks_ScriptLoadUnload_ResetCount)
|
||||
{
|
||||
MaintenanceLoopTicks_ScriptLoadUnload_ResetCount = false;
|
||||
MaintenanceLoopTicks_ScriptLoadUnload_Count = 0;
|
||||
}
|
||||
if (MaintenanceLoopTicks_Other_ResetCount)
|
||||
{
|
||||
MaintenanceLoopTicks_Other_ResetCount = false;
|
||||
MaintenanceLoopTicks_Other_Count = 0;
|
||||
}
|
||||
|
||||
// Increase our counters
|
||||
MaintenanceLoopTicks_ScriptLoadUnload_Count++;
|
||||
MaintenanceLoopTicks_Other_Count++;
|
||||
|
@ -151,7 +165,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
|
|||
// Re-reading config every x seconds
|
||||
if (MaintenanceLoopTicks_Other_Count >= MaintenanceLoopTicks_Other)
|
||||
{
|
||||
MaintenanceLoopTicks_Other_Count = 0;
|
||||
MaintenanceLoopTicks_Other_ResetCount = true;
|
||||
if (m_ScriptEngine.RefreshConfigFilens > 0)
|
||||
{
|
||||
|
||||
|
@ -187,7 +201,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
|
|||
}
|
||||
if (MaintenanceLoopTicks_ScriptLoadUnload_Count >= MaintenanceLoopTicks_ScriptLoadUnload)
|
||||
{
|
||||
MaintenanceLoopTicks_ScriptLoadUnload_Count = 0;
|
||||
MaintenanceLoopTicks_ScriptLoadUnload_ResetCount = true;
|
||||
// LOAD / UNLOAD SCRIPTS
|
||||
if (m_ScriptEngine.m_ScriptManager != null)
|
||||
m_ScriptEngine.m_ScriptManager.DoScriptLoadUnload();
|
||||
|
|
Loading…
Reference in New Issue