Add the same delay factor in the XEngine section for the XEngine
parent
64e4c34c1a
commit
24456e846c
|
@ -66,6 +66,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
internal LLUUID m_itemID;
|
internal LLUUID m_itemID;
|
||||||
internal bool throwErrorOnNotImplemented = true;
|
internal bool throwErrorOnNotImplemented = true;
|
||||||
internal AsyncCommandManager AsyncCommands = null;
|
internal AsyncCommandManager AsyncCommands = null;
|
||||||
|
internal float m_ScriptDelayFactor = 1.0f;
|
||||||
|
|
||||||
public void Initialize(IScriptEngine ScriptEngine, SceneObjectPart host, uint localID, LLUUID itemID)
|
public void Initialize(IScriptEngine ScriptEngine, SceneObjectPart host, uint localID, LLUUID itemID)
|
||||||
{
|
{
|
||||||
|
@ -74,9 +75,24 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
m_localID = localID;
|
m_localID = localID;
|
||||||
m_itemID = itemID;
|
m_itemID = itemID;
|
||||||
|
|
||||||
|
IConfigSource config = new IniConfigSource(Application.iniFilePath);
|
||||||
|
if (config.Configs["XEngine"] == null)
|
||||||
|
config.AddConfig("XEngine");
|
||||||
|
|
||||||
|
m_ScriptDelayFactor = config.Configs["XEngine"].
|
||||||
|
GetFloat("ScriptDelayFactor", 1.0f);
|
||||||
|
|
||||||
AsyncCommands = (AsyncCommandManager)ScriptEngine.AsyncCommands;
|
AsyncCommands = (AsyncCommandManager)ScriptEngine.AsyncCommands;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void ScriptSleep(int delay)
|
||||||
|
{
|
||||||
|
delay = (int)((float)delay * m_ScriptDelayFactor);
|
||||||
|
if (delay == 0)
|
||||||
|
return;
|
||||||
|
System.Threading.Thread.Sleep(delay);
|
||||||
|
}
|
||||||
|
|
||||||
private DateTime m_timer = DateTime.Now;
|
private DateTime m_timer = DateTime.Now;
|
||||||
private bool m_waitingForScriptAnswer=false;
|
private bool m_waitingForScriptAnswer=false;
|
||||||
|
|
||||||
|
@ -2142,7 +2158,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
llApplyImpulse(new LSL_Types.Vector3(llvel.X * groupmass, llvel.Y * groupmass, llvel.Z * groupmass), 0);
|
llApplyImpulse(new LSL_Types.Vector3(llvel.X * groupmass, llvel.Y * groupmass, llvel.Z * groupmass), 0);
|
||||||
found = true;
|
found = true;
|
||||||
//script delay
|
//script delay
|
||||||
System.Threading.Thread.Sleep((int)((groupmass * velmag) / 10));
|
ScriptSleep((int)((groupmass * velmag) / 10));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2798,7 +2814,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
parentPrim.GetProperties(client);
|
parentPrim.GetProperties(client);
|
||||||
|
|
||||||
// sleep for 1 second
|
// sleep for 1 second
|
||||||
System.Threading.Thread.Sleep(1000);
|
ScriptSleep(1000);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -657,6 +657,8 @@ EventLimit = 30
|
||||||
KillTimedOutScripts = false
|
KillTimedOutScripts = false
|
||||||
; Allow OS console command functionality (VERY DANGEROUS!!)
|
; Allow OS console command functionality (VERY DANGEROUS!!)
|
||||||
AllowosConsoleCommand = false
|
AllowosConsoleCommand = false
|
||||||
|
; Sets the multiplier for the scripting delays
|
||||||
|
ScriptDelayFactor = 1.0
|
||||||
|
|
||||||
|
|
||||||
[GridInfo]
|
[GridInfo]
|
||||||
|
|
Loading…
Reference in New Issue