mirror of
https://github.com/opensim/opensim.git
synced 2026-08-01 22:26:09 +08:00
* A hacky Top Scripts display. It isn't accurate as far as ms accounting, however you can use it to help find out what scripts are causing your simulator to cry.
* Access it from the Estate tools/Debug tab.
This commit is contained in:
@@ -474,7 +474,7 @@ namespace OpenSim.Region.ScriptEngine.Common
|
||||
|
||||
public void llSensor(string name, string id, int type, double range, double arc)
|
||||
{
|
||||
m_host.AddScriptLPS(1);
|
||||
m_host.AddScriptLPS(300);
|
||||
LLUUID keyID = LLUUID.Zero;
|
||||
LLUUID.TryParse(id, out keyID);
|
||||
|
||||
@@ -1818,7 +1818,7 @@ namespace OpenSim.Region.ScriptEngine.Common
|
||||
|
||||
public void llSleep(double sec)
|
||||
{
|
||||
m_host.AddScriptLPS(1);
|
||||
m_host.AddScriptLPS((int)(sec * 100));
|
||||
Thread.Sleep((int)(sec * 1000));
|
||||
}
|
||||
|
||||
@@ -2582,7 +2582,7 @@ namespace OpenSim.Region.ScriptEngine.Common
|
||||
|
||||
public void llResetScript()
|
||||
{
|
||||
m_host.AddScriptLPS(1);
|
||||
m_host.AddScriptLPS(800);
|
||||
m_ScriptEngine.m_ScriptManager.ResetScript(m_localID, m_itemID);
|
||||
}
|
||||
|
||||
@@ -4279,7 +4279,7 @@ namespace OpenSim.Region.ScriptEngine.Common
|
||||
ScriptManager sm;
|
||||
IScript script = null;
|
||||
|
||||
m_host.AddScriptLPS(1);
|
||||
m_host.AddScriptLPS(8000);
|
||||
|
||||
// These functions are supposed to be robust,
|
||||
// so get the state one step at a time.
|
||||
|
||||
@@ -316,6 +316,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugin
|
||||
m_CmdManager.m_ScriptEngine.m_EventQueueManager.AddToScriptQueue(ts.localID, ts.itemID, "sensor", EventQueueManager.llDetectNull,
|
||||
new object[] { new LSL_Types.LSLInteger(SensedObjects.Length) });
|
||||
}
|
||||
m_CmdManager.m_ScriptEngine.World.EventManager.TriggerTimerEvent(ts.localID, ts.interval);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -126,6 +126,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugin
|
||||
// Add it to queue
|
||||
m_CmdManager.m_ScriptEngine.m_EventQueueManager.AddToScriptQueue(ts.localID, ts.itemID, "timer", EventQueueManager.llDetectNull,
|
||||
null);
|
||||
m_CmdManager.m_ScriptEngine.World.EventManager.TriggerTimerEvent(ts.localID, ((double)ts.interval / 10000000));
|
||||
// set next interval
|
||||
|
||||
//ts.next = DateTime.Now.ToUniversalTime().AddSeconds(ts.interval);
|
||||
|
||||
Reference in New Issue
Block a user