diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/ScriptEngine/DotNetEngine/LSLLongCmdHandler.cs | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/LSLLongCmdHandler.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/LSLLongCmdHandler.cs index 2395dbd..5ce972a 100644 --- a/OpenSim/Region/ScriptEngine/DotNetEngine/LSLLongCmdHandler.cs +++ b/OpenSim/Region/ScriptEngine/DotNetEngine/LSLLongCmdHandler.cs | |||
@@ -124,20 +124,24 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine | |||
124 | if (Timers.Count == 0) | 124 | if (Timers.Count == 0) |
125 | return; | 125 | return; |
126 | 126 | ||
127 | // Go through all timers | 127 | lock (ListLock) |
128 | foreach (TimerClass ts in Timers) | ||
129 | { | 128 | { |
130 | // Time has passed? | 129 | |
131 | if (ts.next.ToUniversalTime() < DateTime.Now.ToUniversalTime()) | 130 | // Go through all timers |
131 | foreach (TimerClass ts in Timers) | ||
132 | { | 132 | { |
133 | // Add it to queue | 133 | // Time has passed? |
134 | myScriptEngine.myEventQueueManager.AddToScriptQueue(ts.localID, ts.itemID, "timer", new object[] { }); | 134 | if (ts.next.ToUniversalTime() < DateTime.Now.ToUniversalTime()) |
135 | // set next interval | 135 | { |
136 | 136 | // Add it to queue | |
137 | 137 | myScriptEngine.myEventQueueManager.AddToScriptQueue(ts.localID, ts.itemID, "timer", new object[] { }); | |
138 | ts.next = DateTime.Now.ToUniversalTime().AddSeconds(ts.interval); | 138 | // set next interval |
139 | |||
140 | |||
141 | ts.next = DateTime.Now.ToUniversalTime().AddSeconds(ts.interval); | ||
142 | } | ||
139 | } | 143 | } |
140 | } | 144 | } // lock |
141 | } | 145 | } |
142 | 146 | ||
143 | } | 147 | } |