aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventManager.cs
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/EventManager.cs
parent* Disabled IntergridModule until a Mono bug can be isolated. (diff)
downloadopensim-SC-36bf16d35e928a338c932feeec42c0c8f35d8846.zip
opensim-SC-36bf16d35e928a338c932feeec42c0c8f35d8846.tar.gz
opensim-SC-36bf16d35e928a338c932feeec42c0c8f35d8846.tar.bz2
opensim-SC-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/EventManager.cs')
-rw-r--r--OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventManager.cs23
1 files changed, 12 insertions, 11 deletions
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)