diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/Dataserver.cs (renamed from OpenSim/Region/ScriptEngine/XEngine/AsyncCommandPlugins/Dataserver.cs) | 9 | ||||
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/HttpRequest.cs (renamed from OpenSim/Region/ScriptEngine/XEngine/AsyncCommandPlugins/HttpRequest.cs) | 14 | ||||
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/Listener.cs (renamed from OpenSim/Region/ScriptEngine/XEngine/AsyncCommandPlugins/Listener.cs) | 9 | ||||
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs (renamed from OpenSim/Region/ScriptEngine/XEngine/AsyncCommandPlugins/SensorRepeat.cs) | 30 | ||||
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/Timer.cs (renamed from OpenSim/Region/ScriptEngine/XEngine/AsyncCommandPlugins/Timer.cs) | 7 | ||||
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/XmlRequest.cs (renamed from OpenSim/Region/ScriptEngine/XEngine/AsyncCommandPlugins/XmlRequest.cs) | 22 |
6 files changed, 47 insertions, 44 deletions
diff --git a/OpenSim/Region/ScriptEngine/XEngine/AsyncCommandPlugins/Dataserver.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/Dataserver.cs index 47ab420..6c88ae86 100644 --- a/OpenSim/Region/ScriptEngine/XEngine/AsyncCommandPlugins/Dataserver.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/Dataserver.cs | |||
@@ -29,9 +29,10 @@ using System; | |||
29 | using System.Collections; | 29 | using System.Collections; |
30 | using System.Collections.Generic; | 30 | using System.Collections.Generic; |
31 | using libsecondlife; | 31 | using libsecondlife; |
32 | using OpenSim.Region.ScriptEngine.XEngine.Script; | 32 | using OpenSim.Region.ScriptEngine.Shared; |
33 | using OpenSim.Region.ScriptEngine.Shared.Api; | ||
33 | 34 | ||
34 | namespace OpenSim.Region.ScriptEngine.XEngine.AsyncCommandPlugins | 35 | namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins |
35 | { | 36 | { |
36 | public class Dataserver | 37 | public class Dataserver |
37 | { | 38 | { |
@@ -94,10 +95,10 @@ namespace OpenSim.Region.ScriptEngine.XEngine.AsyncCommandPlugins | |||
94 | } | 95 | } |
95 | 96 | ||
96 | m_CmdManager.m_ScriptEngine.PostObjectEvent(ds.localID, | 97 | m_CmdManager.m_ScriptEngine.PostObjectEvent(ds.localID, |
97 | new XEventParams("dataserver", new Object[] | 98 | new EventParams("dataserver", new Object[] |
98 | { new LSL_Types.LSLString(ds.ID.ToString()), | 99 | { new LSL_Types.LSLString(ds.ID.ToString()), |
99 | new LSL_Types.LSLString(reply)}, | 100 | new LSL_Types.LSLString(reply)}, |
100 | new XDetectParams[0])); | 101 | new DetectParams[0])); |
101 | } | 102 | } |
102 | 103 | ||
103 | public void RemoveEvents(uint localID, LLUUID itemID) | 104 | public void RemoveEvents(uint localID, LLUUID itemID) |
diff --git a/OpenSim/Region/ScriptEngine/XEngine/AsyncCommandPlugins/HttpRequest.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/HttpRequest.cs index 089e016..92f603d 100644 --- a/OpenSim/Region/ScriptEngine/XEngine/AsyncCommandPlugins/HttpRequest.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/HttpRequest.cs | |||
@@ -28,9 +28,11 @@ | |||
28 | using System; | 28 | using System; |
29 | using OpenSim.Region.Environment.Interfaces; | 29 | using OpenSim.Region.Environment.Interfaces; |
30 | using OpenSim.Region.Environment.Modules.Scripting.HttpRequest; | 30 | using OpenSim.Region.Environment.Modules.Scripting.HttpRequest; |
31 | using OpenSim.Region.ScriptEngine.XEngine.Script; | 31 | using OpenSim.Region.ScriptEngine.Shared; |
32 | using OpenSim.Region.ScriptEngine.Interfaces; | ||
33 | using OpenSim.Region.ScriptEngine.Shared.Api; | ||
32 | 34 | ||
33 | namespace OpenSim.Region.ScriptEngine.XEngine.AsyncCommandPlugins | 35 | namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins |
34 | { | 36 | { |
35 | public class HttpRequest | 37 | public class HttpRequest |
36 | { | 38 | { |
@@ -75,11 +77,11 @@ namespace OpenSim.Region.ScriptEngine.XEngine.AsyncCommandPlugins | |||
75 | new LSL_Types.LSLString(httpInfo.response_body) | 77 | new LSL_Types.LSLString(httpInfo.response_body) |
76 | }; | 78 | }; |
77 | 79 | ||
78 | foreach (XEngine xe in XEngine.ScriptEngines) | 80 | foreach (AsyncCommandManager m in m_CmdManager.Managers) |
79 | { | 81 | { |
80 | if (xe.PostObjectEvent(httpInfo.localID, | 82 | if (m.m_ScriptEngine.PostObjectEvent(httpInfo.localID, |
81 | new XEventParams("http_response", | 83 | new EventParams("http_response", |
82 | resobj, new XDetectParams[0]))) | 84 | resobj, new DetectParams[0]))) |
83 | break; | 85 | break; |
84 | } | 86 | } |
85 | httpInfo = iHttpReq.GetNextCompletedRequest(); | 87 | httpInfo = iHttpReq.GetNextCompletedRequest(); |
diff --git a/OpenSim/Region/ScriptEngine/XEngine/AsyncCommandPlugins/Listener.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/Listener.cs index 1144c00..11b45b1 100644 --- a/OpenSim/Region/ScriptEngine/XEngine/AsyncCommandPlugins/Listener.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/Listener.cs | |||
@@ -29,9 +29,10 @@ using System; | |||
29 | using libsecondlife; | 29 | using libsecondlife; |
30 | using OpenSim.Region.Environment.Interfaces; | 30 | using OpenSim.Region.Environment.Interfaces; |
31 | using OpenSim.Region.Environment.Modules.Scripting.WorldComm; | 31 | using OpenSim.Region.Environment.Modules.Scripting.WorldComm; |
32 | using OpenSim.Region.ScriptEngine.XEngine.Script; | 32 | using OpenSim.Region.ScriptEngine.Shared; |
33 | using OpenSim.Region.ScriptEngine.Shared.Api; | ||
33 | 34 | ||
34 | namespace OpenSim.Region.ScriptEngine.XEngine.AsyncCommandPlugins | 35 | namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins |
35 | { | 36 | { |
36 | public class Listener | 37 | public class Listener |
37 | { | 38 | { |
@@ -66,9 +67,9 @@ namespace OpenSim.Region.ScriptEngine.XEngine.AsyncCommandPlugins | |||
66 | }; | 67 | }; |
67 | 68 | ||
68 | m_CmdManager.m_ScriptEngine.PostScriptEvent( | 69 | m_CmdManager.m_ScriptEngine.PostScriptEvent( |
69 | lInfo.GetItemID(), new XEventParams( | 70 | lInfo.GetItemID(), new EventParams( |
70 | "listen", resobj, | 71 | "listen", resobj, |
71 | new XDetectParams[0])); | 72 | new DetectParams[0])); |
72 | } | 73 | } |
73 | } | 74 | } |
74 | } | 75 | } |
diff --git a/OpenSim/Region/ScriptEngine/XEngine/AsyncCommandPlugins/SensorRepeat.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs index 8a25098..5833512 100644 --- a/OpenSim/Region/ScriptEngine/XEngine/AsyncCommandPlugins/SensorRepeat.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs | |||
@@ -30,9 +30,10 @@ using System.Collections.Generic; | |||
30 | using libsecondlife; | 30 | using libsecondlife; |
31 | using OpenSim.Framework; | 31 | using OpenSim.Framework; |
32 | using OpenSim.Region.Environment.Scenes; | 32 | using OpenSim.Region.Environment.Scenes; |
33 | using OpenSim.Region.ScriptEngine.XEngine.Script; | 33 | using OpenSim.Region.ScriptEngine.Shared; |
34 | using OpenSim.Region.ScriptEngine.Shared.Api; | ||
34 | 35 | ||
35 | namespace OpenSim.Region.ScriptEngine.XEngine.AsyncCommandPlugins | 36 | namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins |
36 | { | 37 | { |
37 | public class SensorRepeat | 38 | public class SensorRepeat |
38 | { | 39 | { |
@@ -72,8 +73,6 @@ namespace OpenSim.Region.ScriptEngine.XEngine.AsyncCommandPlugins | |||
72 | string name, LLUUID keyID, int type, double range, | 73 | string name, LLUUID keyID, int type, double range, |
73 | double arc, double sec, SceneObjectPart host) | 74 | double arc, double sec, SceneObjectPart host) |
74 | { | 75 | { |
75 | Console.WriteLine("SetSensorEvent"); | ||
76 | |||
77 | // Always remove first, in case this is a re-set | 76 | // Always remove first, in case this is a re-set |
78 | UnSetSenseRepeaterEvents(m_localID, m_itemID); | 77 | UnSetSenseRepeaterEvents(m_localID, m_itemID); |
79 | if (sec == 0) // Disabling timer | 78 | if (sec == 0) // Disabling timer |
@@ -163,7 +162,6 @@ namespace OpenSim.Region.ScriptEngine.XEngine.AsyncCommandPlugins | |||
163 | Dictionary<LLUUID, LSL_Types.list> Obj = null; | 162 | Dictionary<LLUUID, LSL_Types.list> Obj = null; |
164 | if (!SenseEvents.TryGetValue(m_localID, out Obj)) | 163 | if (!SenseEvents.TryGetValue(m_localID, out Obj)) |
165 | { | 164 | { |
166 | m_CmdManager.m_ScriptEngine.Log.Info("[AsyncLSL]: GetSensorList missing localID: " + m_localID); | ||
167 | return null; | 165 | return null; |
168 | } | 166 | } |
169 | lock (Obj) | 167 | lock (Obj) |
@@ -172,7 +170,6 @@ namespace OpenSim.Region.ScriptEngine.XEngine.AsyncCommandPlugins | |||
172 | LSL_Types.list SenseList = null; | 170 | LSL_Types.list SenseList = null; |
173 | if (!Obj.TryGetValue(m_itemID, out SenseList)) | 171 | if (!Obj.TryGetValue(m_itemID, out SenseList)) |
174 | { | 172 | { |
175 | m_CmdManager.m_ScriptEngine.Log.Info("[AsyncLSL]: GetSensorList missing itemID: " + m_itemID); | ||
176 | return null; | 173 | return null; |
177 | } | 174 | } |
178 | return SenseList; | 175 | return SenseList; |
@@ -182,15 +179,12 @@ namespace OpenSim.Region.ScriptEngine.XEngine.AsyncCommandPlugins | |||
182 | 179 | ||
183 | private void SensorSweep(SenseRepeatClass ts) | 180 | private void SensorSweep(SenseRepeatClass ts) |
184 | { | 181 | { |
185 | //m_ScriptEngine.Log.Info("[AsyncLSL]:Enter SensorSweep"); | ||
186 | SceneObjectPart SensePoint = ts.host; | 182 | SceneObjectPart SensePoint = ts.host; |
187 | 183 | ||
188 | if (SensePoint == null) | 184 | if (SensePoint == null) |
189 | { | 185 | { |
190 | //m_ScriptEngine.Log.Info("[AsyncLSL]: Enter SensorSweep (SensePoint == null) for "+ts.itemID.ToString()); | ||
191 | return; | 186 | return; |
192 | } | 187 | } |
193 | //m_ScriptEngine.Log.Info("[AsyncLSL]: Enter SensorSweep Scan"); | ||
194 | 188 | ||
195 | LLVector3 sensorPos = SensePoint.AbsolutePosition; | 189 | LLVector3 sensorPos = SensePoint.AbsolutePosition; |
196 | LLVector3 regionPos = new LLVector3(m_CmdManager.m_ScriptEngine.World.RegionInfo.RegionLocX * Constants.RegionSize, m_CmdManager.m_ScriptEngine.World.RegionInfo.RegionLocY * Constants.RegionSize, 0); | 190 | LLVector3 regionPos = new LLVector3(m_CmdManager.m_ScriptEngine.World.RegionInfo.RegionLocX * Constants.RegionSize, m_CmdManager.m_ScriptEngine.World.RegionInfo.RegionLocY * Constants.RegionSize, 0); |
@@ -220,7 +214,10 @@ namespace OpenSim.Region.ScriptEngine.XEngine.AsyncCommandPlugins | |||
220 | objtype |= 0x04; // passive non-moving | 214 | objtype |= 0x04; // passive non-moving |
221 | else | 215 | else |
222 | objtype |= 0x02; // active moving | 216 | objtype |= 0x02; // active moving |
223 | if (ent is IScript) objtype |= 0x08; // Scripted. It COULD have one hidden ... | 217 | |
218 | SceneObjectPart part = m_CmdManager.m_ScriptEngine.World.GetSceneObjectPart(ent.UUID); | ||
219 | |||
220 | if (part != null && part.ContainsScripts()) objtype |= 0x08; // Scripted. It COULD have one hidden ... | ||
224 | 221 | ||
225 | if (((ts.type & objtype) != 0) || ((ts.type & objtype) == ts.type)) | 222 | if (((ts.type & objtype) != 0) || ((ts.type & objtype) == ts.type)) |
226 | { | 223 | { |
@@ -288,7 +285,6 @@ namespace OpenSim.Region.ScriptEngine.XEngine.AsyncCommandPlugins | |||
288 | } | 285 | } |
289 | } | 286 | } |
290 | } | 287 | } |
291 | //m_ScriptEngine.Log.Info("[AsyncLSL]: Enter SensorSweep SenseLock"); | ||
292 | 288 | ||
293 | lock (SenseLock) | 289 | lock (SenseLock) |
294 | { | 290 | { |
@@ -311,24 +307,24 @@ namespace OpenSim.Region.ScriptEngine.XEngine.AsyncCommandPlugins | |||
311 | // send a "no_sensor" | 307 | // send a "no_sensor" |
312 | // Add it to queue | 308 | // Add it to queue |
313 | m_CmdManager.m_ScriptEngine.PostScriptEvent(ts.itemID, | 309 | m_CmdManager.m_ScriptEngine.PostScriptEvent(ts.itemID, |
314 | new XEventParams("no_sensor", new Object[0], | 310 | new EventParams("no_sensor", new Object[0], |
315 | new XDetectParams[0])); | 311 | new DetectParams[0])); |
316 | } | 312 | } |
317 | else | 313 | else |
318 | { | 314 | { |
319 | XDetectParams[] detect = | 315 | DetectParams[] detect = |
320 | new XDetectParams[SensedObjects.Length]; | 316 | new DetectParams[SensedObjects.Length]; |
321 | 317 | ||
322 | int idx; | 318 | int idx; |
323 | for (idx = 0; idx < SensedObjects.Length; idx++) | 319 | for (idx = 0; idx < SensedObjects.Length; idx++) |
324 | { | 320 | { |
325 | detect[idx] = new XDetectParams(); | 321 | detect[idx] = new DetectParams(); |
326 | detect[idx].Key=(LLUUID)(SensedObjects.Data[idx]); | 322 | detect[idx].Key=(LLUUID)(SensedObjects.Data[idx]); |
327 | detect[idx].Populate(m_CmdManager.m_ScriptEngine.World); | 323 | detect[idx].Populate(m_CmdManager.m_ScriptEngine.World); |
328 | } | 324 | } |
329 | 325 | ||
330 | m_CmdManager.m_ScriptEngine.PostScriptEvent(ts.itemID, | 326 | m_CmdManager.m_ScriptEngine.PostScriptEvent(ts.itemID, |
331 | new XEventParams("sensor", | 327 | new EventParams("sensor", |
332 | new Object[] { | 328 | new Object[] { |
333 | new LSL_Types.LSLInteger(SensedObjects.Length) }, | 329 | new LSL_Types.LSLInteger(SensedObjects.Length) }, |
334 | detect)); | 330 | detect)); |
diff --git a/OpenSim/Region/ScriptEngine/XEngine/AsyncCommandPlugins/Timer.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/Timer.cs index 3dd875a..36e992b 100644 --- a/OpenSim/Region/ScriptEngine/XEngine/AsyncCommandPlugins/Timer.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/Timer.cs | |||
@@ -29,8 +29,9 @@ using System; | |||
29 | using System.Collections; | 29 | using System.Collections; |
30 | using System.Collections.Generic; | 30 | using System.Collections.Generic; |
31 | using libsecondlife; | 31 | using libsecondlife; |
32 | using OpenSim.Region.ScriptEngine.Shared.Api; | ||
32 | 33 | ||
33 | namespace OpenSim.Region.ScriptEngine.XEngine.AsyncCommandPlugins | 34 | namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins |
34 | { | 35 | { |
35 | public class Timer | 36 | public class Timer |
36 | { | 37 | { |
@@ -110,8 +111,8 @@ namespace OpenSim.Region.ScriptEngine.XEngine.AsyncCommandPlugins | |||
110 | // Console.WriteLine("Time has passed: Now: " + DateTime.Now.Ticks + ", Passed: " + ts.next); | 111 | // Console.WriteLine("Time has passed: Now: " + DateTime.Now.Ticks + ", Passed: " + ts.next); |
111 | // Add it to queue | 112 | // Add it to queue |
112 | m_CmdManager.m_ScriptEngine.PostScriptEvent(ts.itemID, | 113 | m_CmdManager.m_ScriptEngine.PostScriptEvent(ts.itemID, |
113 | new XEventParams("timer", new Object[0], | 114 | new EventParams("timer", new Object[0], |
114 | new XDetectParams[0])); | 115 | new DetectParams[0])); |
115 | // set next interval | 116 | // set next interval |
116 | 117 | ||
117 | //ts.next = DateTime.Now.ToUniversalTime().AddSeconds(ts.interval); | 118 | //ts.next = DateTime.Now.ToUniversalTime().AddSeconds(ts.interval); |
diff --git a/OpenSim/Region/ScriptEngine/XEngine/AsyncCommandPlugins/XmlRequest.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/XmlRequest.cs index 288349e..89bf51c 100644 --- a/OpenSim/Region/ScriptEngine/XEngine/AsyncCommandPlugins/XmlRequest.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/XmlRequest.cs | |||
@@ -28,9 +28,11 @@ | |||
28 | using System; | 28 | using System; |
29 | using OpenSim.Region.Environment.Interfaces; | 29 | using OpenSim.Region.Environment.Interfaces; |
30 | using OpenSim.Region.Environment.Modules.Scripting.XMLRPC; | 30 | using OpenSim.Region.Environment.Modules.Scripting.XMLRPC; |
31 | using OpenSim.Region.ScriptEngine.XEngine.Script; | 31 | using OpenSim.Region.ScriptEngine.Interfaces; |
32 | using OpenSim.Region.ScriptEngine.Shared; | ||
33 | using OpenSim.Region.ScriptEngine.Shared.Api; | ||
32 | 34 | ||
33 | namespace OpenSim.Region.ScriptEngine.XEngine.AsyncCommandPlugins | 35 | namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins |
34 | { | 36 | { |
35 | public class XmlRequest | 37 | public class XmlRequest |
36 | { | 38 | { |
@@ -69,12 +71,12 @@ namespace OpenSim.Region.ScriptEngine.XEngine.AsyncCommandPlugins | |||
69 | new LSL_Types.LSLString(rInfo.GetStrVal()) | 71 | new LSL_Types.LSLString(rInfo.GetStrVal()) |
70 | }; | 72 | }; |
71 | 73 | ||
72 | foreach (XEngine xe in XEngine.ScriptEngines) | 74 | foreach (AsyncCommandManager m in m_CmdManager.Managers) |
73 | { | 75 | { |
74 | if (xe.PostScriptEvent( | 76 | if (m.m_ScriptEngine.PostScriptEvent( |
75 | rInfo.GetItemID(), new XEventParams( | 77 | rInfo.GetItemID(), new EventParams( |
76 | "remote_data", resobj, | 78 | "remote_data", resobj, |
77 | new XDetectParams[0]))) | 79 | new DetectParams[0]))) |
78 | break; | 80 | break; |
79 | } | 81 | } |
80 | 82 | ||
@@ -98,12 +100,12 @@ namespace OpenSim.Region.ScriptEngine.XEngine.AsyncCommandPlugins | |||
98 | new LSL_Types.LSLString(srdInfo.sdata) | 100 | new LSL_Types.LSLString(srdInfo.sdata) |
99 | }; | 101 | }; |
100 | 102 | ||
101 | foreach (XEngine xe in XEngine.ScriptEngines) | 103 | foreach (AsyncCommandManager m in m_CmdManager.Managers) |
102 | { | 104 | { |
103 | if (xe.PostScriptEvent( | 105 | if (m.m_ScriptEngine.PostScriptEvent( |
104 | srdInfo.m_itemID, new XEventParams( | 106 | srdInfo.m_itemID, new EventParams( |
105 | "remote_data", resobj, | 107 | "remote_data", resobj, |
106 | new XDetectParams[0]))) | 108 | new DetectParams[0]))) |
107 | break; | 109 | break; |
108 | } | 110 | } |
109 | 111 | ||