aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Common
diff options
context:
space:
mode:
authorTeravus Ovares2008-05-25 20:50:45 +0000
committerTeravus Ovares2008-05-25 20:50:45 +0000
commitc20f7d6171a9df151c3ccde063336338da9ae322 (patch)
treea6093b52da4093e3b692771a421ce4a55052d24b /OpenSim/Region/ScriptEngine/Common
parentThank you very much, Melanie for a patch that: (diff)
downloadopensim-SC-c20f7d6171a9df151c3ccde063336338da9ae322.zip
opensim-SC-c20f7d6171a9df151c3ccde063336338da9ae322.tar.gz
opensim-SC-c20f7d6171a9df151c3ccde063336338da9ae322.tar.bz2
opensim-SC-c20f7d6171a9df151c3ccde063336338da9ae322.tar.xz
* 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.
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Common')
-rw-r--r--OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs8
-rw-r--r--OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/SensorRepeat.cs1
-rw-r--r--OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/Timer.cs1
3 files changed, 6 insertions, 4 deletions
diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
index 3fa65f5..fbfb400 100644
--- a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
+++ b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
@@ -474,7 +474,7 @@ namespace OpenSim.Region.ScriptEngine.Common
474 474
475 public void llSensor(string name, string id, int type, double range, double arc) 475 public void llSensor(string name, string id, int type, double range, double arc)
476 { 476 {
477 m_host.AddScriptLPS(1); 477 m_host.AddScriptLPS(300);
478 LLUUID keyID = LLUUID.Zero; 478 LLUUID keyID = LLUUID.Zero;
479 LLUUID.TryParse(id, out keyID); 479 LLUUID.TryParse(id, out keyID);
480 480
@@ -1818,7 +1818,7 @@ namespace OpenSim.Region.ScriptEngine.Common
1818 1818
1819 public void llSleep(double sec) 1819 public void llSleep(double sec)
1820 { 1820 {
1821 m_host.AddScriptLPS(1); 1821 m_host.AddScriptLPS((int)(sec * 100));
1822 Thread.Sleep((int)(sec * 1000)); 1822 Thread.Sleep((int)(sec * 1000));
1823 } 1823 }
1824 1824
@@ -2582,7 +2582,7 @@ namespace OpenSim.Region.ScriptEngine.Common
2582 2582
2583 public void llResetScript() 2583 public void llResetScript()
2584 { 2584 {
2585 m_host.AddScriptLPS(1); 2585 m_host.AddScriptLPS(800);
2586 m_ScriptEngine.m_ScriptManager.ResetScript(m_localID, m_itemID); 2586 m_ScriptEngine.m_ScriptManager.ResetScript(m_localID, m_itemID);
2587 } 2587 }
2588 2588
@@ -4279,7 +4279,7 @@ namespace OpenSim.Region.ScriptEngine.Common
4279 ScriptManager sm; 4279 ScriptManager sm;
4280 IScript script = null; 4280 IScript script = null;
4281 4281
4282 m_host.AddScriptLPS(1); 4282 m_host.AddScriptLPS(8000);
4283 4283
4284 // These functions are supposed to be robust, 4284 // These functions are supposed to be robust,
4285 // so get the state one step at a time. 4285 // so get the state one step at a time.
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/SensorRepeat.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/SensorRepeat.cs
index 13c9d25..82bd3ac 100644
--- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/SensorRepeat.cs
+++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/SensorRepeat.cs
@@ -316,6 +316,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugin
316 m_CmdManager.m_ScriptEngine.m_EventQueueManager.AddToScriptQueue(ts.localID, ts.itemID, "sensor", EventQueueManager.llDetectNull, 316 m_CmdManager.m_ScriptEngine.m_EventQueueManager.AddToScriptQueue(ts.localID, ts.itemID, "sensor", EventQueueManager.llDetectNull,
317 new object[] { new LSL_Types.LSLInteger(SensedObjects.Length) }); 317 new object[] { new LSL_Types.LSLInteger(SensedObjects.Length) });
318 } 318 }
319 m_CmdManager.m_ScriptEngine.World.EventManager.TriggerTimerEvent(ts.localID, ts.interval);
319 } 320 }
320 } 321 }
321 } 322 }
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/Timer.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/Timer.cs
index 6f88e11..f6de3c6 100644
--- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/Timer.cs
+++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/Timer.cs
@@ -126,6 +126,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugin
126 // Add it to queue 126 // Add it to queue
127 m_CmdManager.m_ScriptEngine.m_EventQueueManager.AddToScriptQueue(ts.localID, ts.itemID, "timer", EventQueueManager.llDetectNull, 127 m_CmdManager.m_ScriptEngine.m_EventQueueManager.AddToScriptQueue(ts.localID, ts.itemID, "timer", EventQueueManager.llDetectNull,
128 null); 128 null);
129 m_CmdManager.m_ScriptEngine.World.EventManager.TriggerTimerEvent(ts.localID, ((double)ts.interval / 10000000));
129 // set next interval 130 // set next interval
130 131
131 //ts.next = DateTime.Now.ToUniversalTime().AddSeconds(ts.interval); 132 //ts.next = DateTime.Now.ToUniversalTime().AddSeconds(ts.interval);