aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase
diff options
context:
space:
mode:
authorTeravus Ovares2008-04-30 03:36:13 +0000
committerTeravus Ovares2008-04-30 03:36:13 +0000
commit36bf16d35e928a338c932feeec42c0c8f35d8846 (patch)
tree06f11a4c546fce85fe1504fce08a09dd4bdebb06 /OpenSim/Region/ScriptEngine/Common/ScriptEngineBase
parent* Disabled IntergridModule until a Mono bug can be isolated. (diff)
downloadopensim-SC_OLD-36bf16d35e928a338c932feeec42c0c8f35d8846.zip
opensim-SC_OLD-36bf16d35e928a338c932feeec42c0c8f35d8846.tar.gz
opensim-SC_OLD-36bf16d35e928a338c932feeec42c0c8f35d8846.tar.bz2
opensim-SC_OLD-36bf16d35e928a338c932feeec42c0c8f35d8846.tar.xz
Patch from Melanie: 0001077: [PATCH] LSL types cannot be cast implicitly or explicitly in many cases Thanks Melanie!
* Also, I moved the event parser and re-writer to a separate static object. More work will be done here shortly.
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Common/ScriptEngineBase')
-rw-r--r--OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/HttpRequest.cs2
-rw-r--r--OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/Listener.cs2
-rw-r--r--OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/SensorRepeat.cs2
-rw-r--r--OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/XmlRequest.cs12
-rw-r--r--OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventManager.cs23
5 files changed, 21 insertions, 20 deletions
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/HttpRequest.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/HttpRequest.cs
index 521402e..4b7ee84 100644
--- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/HttpRequest.cs
+++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/HttpRequest.cs
@@ -72,7 +72,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugin
72 { 72 {
73 object[] resobj = new object[] 73 object[] resobj = new object[]
74 { 74 {
75 httpInfo.reqID.ToString(), httpInfo.status, null, httpInfo.response_body 75 new LSL_Types.LSLString(httpInfo.reqID.ToString()), new LSL_Types.LSLInteger(httpInfo.status), null, new LSL_Types.LSLString(httpInfo.response_body)
76 }; 76 };
77 77
78 sman.m_EventQueueManager.AddToScriptQueue( 78 sman.m_EventQueueManager.AddToScriptQueue(
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/Listener.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/Listener.cs
index 874a905..2b68360 100644
--- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/Listener.cs
+++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/Listener.cs
@@ -58,7 +58,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugin
58 object[] resobj = new object[] 58 object[] resobj = new object[]
59 { 59 {
60 //lInfo.GetChannel(), lInfo.GetName(), lInfo.GetID().ToString(), lInfo.GetMessage() 60 //lInfo.GetChannel(), lInfo.GetName(), lInfo.GetID().ToString(), lInfo.GetMessage()
61 lInfo.GetChannel(), lInfo.GetName(), lInfo.GetSourceItemID().ToString(), lInfo.GetMessage() 61 new LSL_Types.LSLInteger(lInfo.GetChannel()), new LSL_Types.LSLString(lInfo.GetName()), new LSL_Types.LSLString(lInfo.GetSourceItemID().ToString()), new LSL_Types.LSLString(lInfo.GetMessage())
62 }; 62 };
63 63
64 m_CmdManager.m_ScriptEngine.m_EventQueueManager.AddToScriptQueue( 64 m_CmdManager.m_ScriptEngine.m_EventQueueManager.AddToScriptQueue(
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/SensorRepeat.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/SensorRepeat.cs
index 71ae80c..1210b77 100644
--- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/SensorRepeat.cs
+++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/SensorRepeat.cs
@@ -314,7 +314,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugin
314 else 314 else
315 { 315 {
316 m_CmdManager.m_ScriptEngine.m_EventQueueManager.AddToScriptQueue(ts.localID, ts.itemID, "sensor", EventQueueManager.llDetectNull, 316 m_CmdManager.m_ScriptEngine.m_EventQueueManager.AddToScriptQueue(ts.localID, ts.itemID, "sensor", EventQueueManager.llDetectNull,
317 new object[] { SensedObjects.Length }); 317 new object[] { new LSL_Types.LSLInteger(SensedObjects.Length) });
318 } 318 }
319 } 319 }
320 } 320 }
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/XmlRequest.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/XmlRequest.cs
index c3e1804..63c529a 100644
--- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/XmlRequest.cs
+++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/XmlRequest.cs
@@ -60,9 +60,9 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugin
60 //Deliver data to prim's remote_data handler 60 //Deliver data to prim's remote_data handler
61 object[] resobj = new object[] 61 object[] resobj = new object[]
62 { 62 {
63 2, rInfo.GetChannelKey().ToString(), rInfo.GetMessageID().ToString(), String.Empty, 63 new LSL_Types.LSLInteger(2), new LSL_Types.LSLString(rInfo.GetChannelKey().ToString()), new LSL_Types.LSLString(rInfo.GetMessageID().ToString()), new LSL_Types.LSLString(String.Empty),
64 rInfo.GetIntValue(), 64 new LSL_Types.LSLInteger(rInfo.GetIntValue()),
65 rInfo.GetStrVal() 65 new LSL_Types.LSLString(rInfo.GetStrVal())
66 }; 66 };
67 m_CmdManager.m_ScriptEngine.m_EventQueueManager.AddToScriptQueue( 67 m_CmdManager.m_ScriptEngine.m_EventQueueManager.AddToScriptQueue(
68 rInfo.GetLocalID(), rInfo.GetItemID(), "remote_data", EventQueueManager.llDetectNull, resobj 68 rInfo.GetLocalID(), rInfo.GetItemID(), "remote_data", EventQueueManager.llDetectNull, resobj
@@ -83,9 +83,9 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugin
83 //Deliver data to prim's remote_data handler 83 //Deliver data to prim's remote_data handler
84 object[] resobj = new object[] 84 object[] resobj = new object[]
85 { 85 {
86 3, srdInfo.channel.ToString(), srdInfo.GetReqID().ToString(), String.Empty, 86 new LSL_Types.LSLInteger(3), new LSL_Types.LSLString(srdInfo.channel.ToString()), new LSL_Types.LSLString(srdInfo.GetReqID().ToString()), new LSL_Types.LSLString(String.Empty),
87 srdInfo.idata, 87 new LSL_Types.LSLInteger(srdInfo.idata),
88 srdInfo.sdata 88 new LSL_Types.LSLString(srdInfo.sdata)
89 }; 89 };
90 m_CmdManager.m_ScriptEngine.m_EventQueueManager.AddToScriptQueue( 90 m_CmdManager.m_ScriptEngine.m_EventQueueManager.AddToScriptQueue(
91 srdInfo.m_localID, srdInfo.m_itemID, "remote_data", EventQueueManager.llDetectNull, resobj 91 srdInfo.m_localID, srdInfo.m_itemID, "remote_data", EventQueueManager.llDetectNull, resobj
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventManager.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventManager.cs
index cbc94e2..3bc01a9 100644
--- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventManager.cs
+++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventManager.cs
@@ -100,7 +100,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
100 public void changed(uint localID, uint change) 100 public void changed(uint localID, uint change)
101 { 101 {
102 // Add to queue for all scripts in localID, Object pass change. 102 // Add to queue for all scripts in localID, Object pass change.
103 myScriptEngine.m_EventQueueManager.AddToObjectQueue(localID, "changed", EventQueueManager.llDetectNull, new object[] { (int)change }); 103 myScriptEngine.m_EventQueueManager.AddToObjectQueue(localID, "changed", EventQueueManager.llDetectNull, new object[] { new LSL_Types.LSLInteger(change) });
104 } 104 }
105 105
106 public void state_entry(uint localID) 106 public void state_entry(uint localID)
@@ -115,7 +115,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
115 EventQueueManager.Queue_llDetectParams_Struct detstruct = new EventQueueManager.Queue_llDetectParams_Struct(); 115 EventQueueManager.Queue_llDetectParams_Struct detstruct = new EventQueueManager.Queue_llDetectParams_Struct();
116 detstruct._key = new LSL_Types.key[1]; 116 detstruct._key = new LSL_Types.key[1];
117 detstruct._key[0] = new LSL_Types.key(remoteClient.AgentId.ToString()); 117 detstruct._key[0] = new LSL_Types.key(remoteClient.AgentId.ToString());
118 myScriptEngine.m_EventQueueManager.AddToObjectQueue(localID, "touch_start", detstruct, new object[] { (int)1 }); 118 myScriptEngine.m_EventQueueManager.AddToObjectQueue(localID, "touch_start", detstruct, new object[] { new LSL_Types.LSLInteger(1) });
119 } 119 }
120 120
121 public void touch_end(uint localID, IClientAPI remoteClient) 121 public void touch_end(uint localID, IClientAPI remoteClient)
@@ -124,7 +124,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
124 EventQueueManager.Queue_llDetectParams_Struct detstruct = new EventQueueManager.Queue_llDetectParams_Struct(); 124 EventQueueManager.Queue_llDetectParams_Struct detstruct = new EventQueueManager.Queue_llDetectParams_Struct();
125 detstruct._key = new LSL_Types.key[1]; 125 detstruct._key = new LSL_Types.key[1];
126 detstruct._key[0] = new LSL_Types.key(remoteClient.AgentId.ToString()); 126 detstruct._key[0] = new LSL_Types.key(remoteClient.AgentId.ToString());
127 myScriptEngine.m_EventQueueManager.AddToObjectQueue(localID, "touch_end", detstruct, new object[] { (int)1 }); 127 myScriptEngine.m_EventQueueManager.AddToObjectQueue(localID, "touch_end", detstruct, new object[] { new LSL_Types.LSLInteger(1) });
128 } 128 }
129 129
130 public void OnRezScript(uint localID, LLUUID itemID, string script) 130 public void OnRezScript(uint localID, LLUUID itemID, string script)
@@ -145,7 +145,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
145 145
146 public void money(uint localID, LLUUID agentID, int amount) 146 public void money(uint localID, LLUUID agentID, int amount)
147 { 147 {
148 myScriptEngine.m_EventQueueManager.AddToObjectQueue(localID, "money", EventQueueManager.llDetectNull, new object[] { agentID.ToString(), (int)amount }); 148 myScriptEngine.m_EventQueueManager.AddToObjectQueue(localID, "money", EventQueueManager.llDetectNull, new object[] { agentID.ToString(), new LSL_Types.LSLInteger(amount) });
149 } 149 }
150 150
151 // TODO: Replace placeholders below 151 // TODO: Replace placeholders below
@@ -154,9 +154,10 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
154 // then queued in EventQueueManager. 154 // then queued in EventQueueManager.
155 // When queued in EventQueueManager they need to be LSL compatible (name and params) 155 // When queued in EventQueueManager they need to be LSL compatible (name and params)
156 156
157 public void state_exit(uint localID, LLUUID itemID) 157 public void state_exit(uint localID)
158 { 158 {
159 myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "state_exit", EventQueueManager.llDetectNull); 159 // Add to queue for all scripts in ObjectID object
160 myScriptEngine.m_EventQueueManager.AddToObjectQueue(localID, "state_exit", EventQueueManager.llDetectNull, new object[] { });
160 } 161 }
161 162
162 public void touch(uint localID, LLUUID itemID) 163 public void touch(uint localID, LLUUID itemID)
@@ -166,22 +167,22 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
166 167
167 public void touch_end(uint localID, LLUUID itemID) 168 public void touch_end(uint localID, LLUUID itemID)
168 { 169 {
169 myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "touch_end", EventQueueManager.llDetectNull); 170 myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "touch_end", EventQueueManager.llDetectNull, new object[] { new LSL_Types.LSLInteger(1) });
170 } 171 }
171 172
172 public void collision_start(uint localID, LLUUID itemID) 173 public void collision_start(uint localID, LLUUID itemID)
173 { 174 {
174 myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "collision_start", EventQueueManager.llDetectNull, new object[] { (int)1 }); 175 myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "collision_start", EventQueueManager.llDetectNull, new object[] { new LSL_Types.LSLInteger(1) });
175 } 176 }
176 177
177 public void collision(uint localID, LLUUID itemID) 178 public void collision(uint localID, LLUUID itemID)
178 { 179 {
179 myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "collision", EventQueueManager.llDetectNull, new object[] { (int)1 }); 180 myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "collision", EventQueueManager.llDetectNull, new object[] { new LSL_Types.LSLInteger(1) });
180 } 181 }
181 182
182 public void collision_end(uint localID, LLUUID itemID) 183 public void collision_end(uint localID, LLUUID itemID)
183 { 184 {
184 myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "collision_end", EventQueueManager.llDetectNull, new object[] { (int)1 }); 185 myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "collision_end", EventQueueManager.llDetectNull, new object[] { new LSL_Types.LSLInteger(1) });
185 } 186 }
186 187
187 public void land_collision_start(uint localID, LLUUID itemID) 188 public void land_collision_start(uint localID, LLUUID itemID)
@@ -237,7 +238,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
237 238
238 public void at_target(uint localID, uint handle, LLVector3 targetpos, LLVector3 atpos) 239 public void at_target(uint localID, uint handle, LLVector3 targetpos, LLVector3 atpos)
239 { 240 {
240 myScriptEngine.m_EventQueueManager.AddToObjectQueue(localID, "at_target", EventQueueManager.llDetectNull, new object[] { (int)handle, new LSL_Types.Vector3(targetpos.X,targetpos.Y,targetpos.Z), new LSL_Types.Vector3(atpos.X,atpos.Y,atpos.Z) }); 241 myScriptEngine.m_EventQueueManager.AddToObjectQueue(localID, "at_target", EventQueueManager.llDetectNull, new object[] { new LSL_Types.LSLInteger(handle), new LSL_Types.Vector3(targetpos.X,targetpos.Y,targetpos.Z), new LSL_Types.Vector3(atpos.X,atpos.Y,atpos.Z) });
241 } 242 }
242 243
243 public void not_at_target(uint localID) 244 public void not_at_target(uint localID)