aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueManager.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueManager.cs')
-rw-r--r--OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueManager.cs36
1 files changed, 29 insertions, 7 deletions
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueManager.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueManager.cs
index af91027..ced4863 100644
--- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueManager.cs
+++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueManager.cs
@@ -96,10 +96,31 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
96 public uint localID; 96 public uint localID;
97 public LLUUID itemID; 97 public LLUUID itemID;
98 public string functionName; 98 public string functionName;
99 public Queue_llDetectParams_Struct llDetectParams;
99 public object[] param; 100 public object[] param;
100 } 101 }
101 102
102 /// <summary> 103 /// <summary>
104 /// Shared empty llDetectNull
105 /// </summary>
106 public readonly static Queue_llDetectParams_Struct llDetectNull = new Queue_llDetectParams_Struct();
107
108 /// <summary>
109 /// Structure to hold data for llDetect* commands
110 /// </summary>
111 public struct Queue_llDetectParams_Struct
112 {
113 // More or less just a placeholder for the actual moving of additional data
114 // should be fixed to something better :)
115 public LSL_Types.key[] _key;
116 public LSL_Types.Quaternion[] _Quaternion;
117 public LSL_Types.Vector3[] _Vector3;
118 public bool[] _bool;
119 public int[] _int;
120 public string [] _string;
121 }
122
123 /// <summary>
103 /// List of localID locks for mutex processing of script events 124 /// List of localID locks for mutex processing of script events
104 /// </summary> 125 /// </summary>
105 private List<uint> objectLocks = new List<uint>(); 126 private List<uint> objectLocks = new List<uint>();
@@ -211,7 +232,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
211 + ", QIS.functionName: " + QIS.functionName); 232 + ", QIS.functionName: " + QIS.functionName);
212#endif 233#endif
213 m_ScriptEngine.m_ScriptManager.ExecuteEvent(QIS.localID, QIS.itemID, 234 m_ScriptEngine.m_ScriptManager.ExecuteEvent(QIS.localID, QIS.itemID,
214 QIS.functionName, QIS.param); 235 QIS.functionName, QIS.llDetectParams, QIS.param);
215 } 236 }
216 catch (Exception e) 237 catch (Exception e)
217 { 238 {
@@ -311,10 +332,10 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
311 /// <summary> 332 /// <summary>
312 /// Add event to event execution queue 333 /// Add event to event execution queue
313 /// </summary> 334 /// </summary>
314 /// <param name="localID"></param> 335 /// <param name="localID">Region object ID</param>
315 /// <param name="FunctionName">Name of the function, will be state + "_event_" + FunctionName</param> 336 /// <param name="FunctionName">Name of the function, will be state + "_event_" + FunctionName</param>
316 /// <param name="param">Array of parameters to match event mask</param> 337 /// <param name="param">Array of parameters to match event mask</param>
317 public void AddToObjectQueue(uint localID, string FunctionName, params object[] param) 338 public void AddToObjectQueue(uint localID, string FunctionName, Queue_llDetectParams_Struct qParams, params object[] param)
318 { 339 {
319 // Determine all scripts in Object and add to their queue 340 // Determine all scripts in Object and add to their queue
320 //myScriptEngine.m_logger.Verbose("ScriptEngine", "EventQueueManager Adding localID: " + localID + ", FunctionName: " + FunctionName); 341 //myScriptEngine.m_logger.Verbose("ScriptEngine", "EventQueueManager Adding localID: " + localID + ", FunctionName: " + FunctionName);
@@ -334,18 +355,18 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
334 { 355 {
335 // Add to each script in that object 356 // Add to each script in that object
336 // TODO: Some scripts may not subscribe to this event. Should we NOT add it? Does it matter? 357 // TODO: Some scripts may not subscribe to this event. Should we NOT add it? Does it matter?
337 AddToScriptQueue(localID, itemID, FunctionName, param); 358 AddToScriptQueue(localID, itemID, FunctionName, qParams, param);
338 } 359 }
339 } 360 }
340 361
341 /// <summary> 362 /// <summary>
342 /// Add event to event execution queue 363 /// Add event to event execution queue
343 /// </summary> 364 /// </summary>
344 /// <param name="localID"></param> 365 /// <param name="localID">Region object ID</param>
345 /// <param name="itemID"></param> 366 /// <param name="itemID">Region script ID</param>
346 /// <param name="FunctionName">Name of the function, will be state + "_event_" + FunctionName</param> 367 /// <param name="FunctionName">Name of the function, will be state + "_event_" + FunctionName</param>
347 /// <param name="param">Array of parameters to match event mask</param> 368 /// <param name="param">Array of parameters to match event mask</param>
348 public void AddToScriptQueue(uint localID, LLUUID itemID, string FunctionName, params object[] param) 369 public void AddToScriptQueue(uint localID, LLUUID itemID, string FunctionName, Queue_llDetectParams_Struct qParams, params object[] param)
349 { 370 {
350 lock (queueLock) 371 lock (queueLock)
351 { 372 {
@@ -354,6 +375,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
354 QIS.localID = localID; 375 QIS.localID = localID;
355 QIS.itemID = itemID; 376 QIS.itemID = itemID;
356 QIS.functionName = FunctionName; 377 QIS.functionName = FunctionName;
378 QIS.llDetectParams = qParams;
357 QIS.param = param; 379 QIS.param = param;
358 380
359 // Add it to queue 381 // Add it to queue