aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptEngine.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptEngine.cs')
-rw-r--r--OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptEngine.cs25
1 files changed, 20 insertions, 5 deletions
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptEngine.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptEngine.cs
index c972683..b09a30b 100644
--- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptEngine.cs
+++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptEngine.cs
@@ -57,7 +57,6 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
57 public EventQueueManager m_EventQueueManager; // Executes events, handles script threads 57 public EventQueueManager m_EventQueueManager; // Executes events, handles script threads
58 public ScriptManager m_ScriptManager; // Load, unload and execute scripts 58 public ScriptManager m_ScriptManager; // Load, unload and execute scripts
59 public AppDomainManager m_AppDomainManager; // Handles loading/unloading of scripts into AppDomains 59 public AppDomainManager m_AppDomainManager; // Handles loading/unloading of scripts into AppDomains
60 public AsyncCommandManager m_ASYNCLSLCommandManager; // Asyncronous LSL commands (commands that returns with an event)
61 public static MaintenanceThread m_MaintenanceThread; // Thread that does different kinds of maintenance, for example refreshing config and killing scripts that has been running too long 60 public static MaintenanceThread m_MaintenanceThread; // Thread that does different kinds of maintenance, for example refreshing config and killing scripts that has been running too long
62 61
63 public IConfigSource ConfigSource; 62 public IConfigSource ConfigSource;
@@ -121,7 +120,6 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
121 // We need to start it 120 // We need to start it
122 m_ScriptManager = newScriptManager; 121 m_ScriptManager = newScriptManager;
123 m_AppDomainManager = new AppDomainManager(this); 122 m_AppDomainManager = new AppDomainManager(this);
124 m_ASYNCLSLCommandManager = new AsyncCommandManager(this);
125 if (m_MaintenanceThread == null) 123 if (m_MaintenanceThread == null)
126 m_MaintenanceThread = new MaintenanceThread(); 124 m_MaintenanceThread = new MaintenanceThread();
127 125
@@ -172,7 +170,6 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
172 if (m_EventManager != null) m_EventManager.ReadConfig(); 170 if (m_EventManager != null) m_EventManager.ReadConfig();
173 if (m_ScriptManager != null) m_ScriptManager.ReadConfig(); 171 if (m_ScriptManager != null) m_ScriptManager.ReadConfig();
174 if (m_AppDomainManager != null) m_AppDomainManager.ReadConfig(); 172 if (m_AppDomainManager != null) m_AppDomainManager.ReadConfig();
175 if (m_ASYNCLSLCommandManager != null) m_ASYNCLSLCommandManager.ReadConfig();
176 if (m_MaintenanceThread != null) m_MaintenanceThread.ReadConfig(); 173 if (m_MaintenanceThread != null) m_MaintenanceThread.ReadConfig();
177 } 174 }
178 175
@@ -196,15 +193,33 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
196 193
197 public bool PostObjectEvent(uint localID, EventParams p) 194 public bool PostObjectEvent(uint localID, EventParams p)
198 { 195 {
199 return m_EventQueueManager.AddToObjectQueue(localID, p.EventName, EventQueueManager.llDetectNull, p.Params); 196 return m_EventQueueManager.AddToObjectQueue(localID, p.EventName, p.DetectParams, p.Params);
200 } 197 }
201 198
202 public bool PostScriptEvent(UUID itemID, EventParams p) 199 public bool PostScriptEvent(UUID itemID, EventParams p)
203 { 200 {
204 uint localID = m_ScriptManager.GetLocalID(itemID); 201 uint localID = m_ScriptManager.GetLocalID(itemID);
205 return m_EventQueueManager.AddToScriptQueue(localID, itemID, p.EventName, EventQueueManager.llDetectNull, p.Params); 202 return m_EventQueueManager.AddToScriptQueue(localID, itemID, p.EventName, p.DetectParams, p.Params);
206 } 203 }
207 204
205 public DetectParams GetDetectParams(UUID itemID, int number)
206 {
207 uint localID = m_ScriptManager.GetLocalID(itemID);
208 if (localID == 0)
209 return null;
210
211 IScript Script = m_ScriptManager.GetScript(localID, itemID);
212
213 if (Script == null)
214 return null;
215
216 DetectParams[] det = m_ScriptManager.GetDetectParams(Script);
217
218 if (number < 0 || number >= det.Length)
219 return null;
220
221 return det[number];
222 }
208 #endregion 223 #endregion
209 } 224 }
210} 225}