diff options
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index e52277d..f4da42f 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -74,6 +74,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
74 | protected AsyncCommandManager AsyncCommands = null; | 74 | protected AsyncCommandManager AsyncCommands = null; |
75 | protected float m_ScriptDelayFactor = 1.0f; | 75 | protected float m_ScriptDelayFactor = 1.0f; |
76 | protected float m_ScriptDistanceFactor = 1.0f; | 76 | protected float m_ScriptDistanceFactor = 1.0f; |
77 | protected float m_MinTimerInterval = 0.5f; | ||
77 | 78 | ||
78 | private DateTime m_timer = DateTime.Now; | 79 | private DateTime m_timer = DateTime.Now; |
79 | private bool m_waitingForScriptAnswer=false; | 80 | private bool m_waitingForScriptAnswer=false; |
@@ -91,6 +92,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
91 | m_ScriptEngine.Config.GetFloat("ScriptDelayFactor", 1.0f); | 92 | m_ScriptEngine.Config.GetFloat("ScriptDelayFactor", 1.0f); |
92 | m_ScriptDistanceFactor = | 93 | m_ScriptDistanceFactor = |
93 | m_ScriptEngine.Config.GetFloat("ScriptDistanceLimitFactor", 1.0f); | 94 | m_ScriptEngine.Config.GetFloat("ScriptDistanceLimitFactor", 1.0f); |
95 | m_MinTimerInterval = | ||
96 | m_ScriptEngine.Config.GetFloat("MinTimerInterval", 0.5f); | ||
94 | 97 | ||
95 | AsyncCommands = new AsyncCommandManager(ScriptEngine); | 98 | AsyncCommands = new AsyncCommandManager(ScriptEngine); |
96 | } | 99 | } |
@@ -2464,6 +2467,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2464 | 2467 | ||
2465 | public void llSetTimerEvent(double sec) | 2468 | public void llSetTimerEvent(double sec) |
2466 | { | 2469 | { |
2470 | if (sec < m_MinTimerInterval) | ||
2471 | sec = m_MinTimerInterval; | ||
2467 | m_host.AddScriptLPS(1); | 2472 | m_host.AddScriptLPS(1); |
2468 | // Setting timer repeat | 2473 | // Setting timer repeat |
2469 | AsyncCommands.TimerPlugin.SetTimerEvent(m_localID, m_itemID, sec); | 2474 | AsyncCommands.TimerPlugin.SetTimerEvent(m_localID, m_itemID, sec); |