diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/ScriptEngine/XEngine/XEngine.cs | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs index 82d00a5..11b93b4 100644 --- a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs +++ b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs | |||
@@ -331,12 +331,12 @@ namespace OpenSim.Region.ScriptEngine.XEngine | |||
331 | Object[] parms = new Object[] | 331 | Object[] parms = new Object[] |
332 | { localID, itemID, script, startParam, postOnRez}; | 332 | { localID, itemID, script, startParam, postOnRez}; |
333 | 333 | ||
334 | lock(m_CompileQueue) | 334 | lock (m_CompileQueue) |
335 | { | 335 | { |
336 | m_CompileQueue.Enqueue(parms); | 336 | m_CompileQueue.Enqueue(parms); |
337 | if(m_CurrentCompile == null) | 337 | if (m_CurrentCompile == null) |
338 | { | 338 | { |
339 | if(m_firstStart) | 339 | if (m_firstStart) |
340 | { | 340 | { |
341 | m_firstStart = false; | 341 | m_firstStart = false; |
342 | m_CurrentCompile = m_ThreadPool.QueueWorkItem( | 342 | m_CurrentCompile = m_ThreadPool.QueueWorkItem( |
@@ -355,9 +355,9 @@ namespace OpenSim.Region.ScriptEngine.XEngine | |||
355 | { | 355 | { |
356 | Thread.Sleep(30000); | 356 | Thread.Sleep(30000); |
357 | 357 | ||
358 | lock(m_CompileQueue) | 358 | lock (m_CompileQueue) |
359 | { | 359 | { |
360 | if(m_CompileQueue.Count > 0) | 360 | if (m_CompileQueue.Count > 0) |
361 | { | 361 | { |
362 | m_CurrentCompile = m_ThreadPool.QueueWorkItem( | 362 | m_CurrentCompile = m_ThreadPool.QueueWorkItem( |
363 | new WorkItemCallback( | 363 | new WorkItemCallback( |
@@ -374,10 +374,10 @@ namespace OpenSim.Region.ScriptEngine.XEngine | |||
374 | public Object DoOnRezScriptQueue(Object dummy) | 374 | public Object DoOnRezScriptQueue(Object dummy) |
375 | { | 375 | { |
376 | Object o; | 376 | Object o; |
377 | lock(m_CompileQueue) | 377 | lock (m_CompileQueue) |
378 | { | 378 | { |
379 | o = m_CompileQueue.Dequeue(); | 379 | o = m_CompileQueue.Dequeue(); |
380 | if(o == null) | 380 | if (o == null) |
381 | { | 381 | { |
382 | m_CurrentCompile = null; | 382 | m_CurrentCompile = null; |
383 | return null; | 383 | return null; |
@@ -386,9 +386,9 @@ namespace OpenSim.Region.ScriptEngine.XEngine | |||
386 | 386 | ||
387 | DoOnRezScript(o); | 387 | DoOnRezScript(o); |
388 | 388 | ||
389 | lock(m_CompileQueue) | 389 | lock (m_CompileQueue) |
390 | { | 390 | { |
391 | if(m_CompileQueue.Count > 0) | 391 | if (m_CompileQueue.Count > 0) |
392 | { | 392 | { |
393 | m_CurrentCompile = m_ThreadPool.QueueWorkItem( | 393 | m_CurrentCompile = m_ThreadPool.QueueWorkItem( |
394 | new WorkItemCallback( | 394 | new WorkItemCallback( |
@@ -1056,7 +1056,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine | |||
1056 | { | 1056 | { |
1057 | m_RunEvents = false; | 1057 | m_RunEvents = false; |
1058 | Start(); | 1058 | Start(); |
1059 | if(postOnRez) | 1059 | if (postOnRez) |
1060 | PostEvent(new EventParams("on_rez", | 1060 | PostEvent(new EventParams("on_rez", |
1061 | new Object[] {new LSL_Types.LSLInteger(startParam)}, new DetectParams[0])); | 1061 | new Object[] {new LSL_Types.LSLInteger(startParam)}, new DetectParams[0])); |
1062 | } | 1062 | } |
@@ -1078,7 +1078,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine | |||
1078 | Start(); | 1078 | Start(); |
1079 | PostEvent(new EventParams("state_entry", | 1079 | PostEvent(new EventParams("state_entry", |
1080 | new Object[0], new DetectParams[0])); | 1080 | new Object[0], new DetectParams[0])); |
1081 | if(postOnRez) | 1081 | if (postOnRez) |
1082 | PostEvent(new EventParams("on_rez", | 1082 | PostEvent(new EventParams("on_rez", |
1083 | new Object[] {new LSL_Types.LSLInteger(startParam)}, new DetectParams[0])); | 1083 | new Object[] {new LSL_Types.LSLInteger(startParam)}, new DetectParams[0])); |
1084 | 1084 | ||
@@ -1090,7 +1090,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine | |||
1090 | Start(); | 1090 | Start(); |
1091 | PostEvent(new EventParams("state_entry", | 1091 | PostEvent(new EventParams("state_entry", |
1092 | new Object[0], new DetectParams[0])); | 1092 | new Object[0], new DetectParams[0])); |
1093 | if(postOnRez) | 1093 | if (postOnRez) |
1094 | PostEvent(new EventParams("on_rez", | 1094 | PostEvent(new EventParams("on_rez", |
1095 | new Object[] {new LSL_Types.LSLInteger(startParam)}, new DetectParams[0])); | 1095 | new Object[] {new LSL_Types.LSLInteger(startParam)}, new DetectParams[0])); |
1096 | } | 1096 | } |
@@ -1102,7 +1102,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine | |||
1102 | PostEvent(new EventParams("state_entry", | 1102 | PostEvent(new EventParams("state_entry", |
1103 | new Object[0], new DetectParams[0])); | 1103 | new Object[0], new DetectParams[0])); |
1104 | 1104 | ||
1105 | if(postOnRez) | 1105 | if (postOnRez) |
1106 | PostEvent(new EventParams("on_rez", | 1106 | PostEvent(new EventParams("on_rez", |
1107 | new Object[] {new LSL_Types.LSLInteger(startParam)}, new DetectParams[0])); | 1107 | new Object[] {new LSL_Types.LSLInteger(startParam)}, new DetectParams[0])); |
1108 | } | 1108 | } |
@@ -1215,7 +1215,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine | |||
1215 | // m_Engine.Log.DebugFormat("[XEngine] Posted event {2} in state {3} to {0}.{1}", | 1215 | // m_Engine.Log.DebugFormat("[XEngine] Posted event {2} in state {3} to {0}.{1}", |
1216 | // m_PrimName, m_ScriptName, data.EventName, m_State); | 1216 | // m_PrimName, m_ScriptName, data.EventName, m_State); |
1217 | 1217 | ||
1218 | if(!Running) | 1218 | if (!Running) |
1219 | return; | 1219 | return; |
1220 | 1220 | ||
1221 | lock (m_EventQueue) | 1221 | lock (m_EventQueue) |
@@ -1393,7 +1393,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine | |||
1393 | 1393 | ||
1394 | m_Script.ResetVars(); | 1394 | m_Script.ResetVars(); |
1395 | m_Engine.m_AsyncCommands.RemoveScript(m_LocalID, m_ItemID); | 1395 | m_Engine.m_AsyncCommands.RemoveScript(m_LocalID, m_ItemID); |
1396 | if(m_CurrentEvent != "state_entry") | 1396 | if (m_CurrentEvent != "state_entry") |
1397 | { | 1397 | { |
1398 | PostEvent(new EventParams("state_entry", | 1398 | PostEvent(new EventParams("state_entry", |
1399 | new Object[0], new DetectParams[0])); | 1399 | new Object[0], new DetectParams[0])); |