diff options
author | onefang | 2019-05-19 21:24:15 +1000 |
---|---|---|
committer | onefang | 2019-05-19 21:24:15 +1000 |
commit | 5e4d6cab00cb29cd088ab7b62ab13aff103b64cb (patch) | |
tree | a9fbc62df9eb2d1d9ba2698d8552eae71eca20d8 /OpenSim/Region/ScriptEngine/XEngine/EventManager.cs | |
parent | Add a build script. (diff) | |
download | opensim-SC-5e4d6cab00cb29cd088ab7b62ab13aff103b64cb.zip opensim-SC-5e4d6cab00cb29cd088ab7b62ab13aff103b64cb.tar.gz opensim-SC-5e4d6cab00cb29cd088ab7b62ab13aff103b64cb.tar.bz2 opensim-SC-5e4d6cab00cb29cd088ab7b62ab13aff103b64cb.tar.xz |
Dump OpenSim 0.9.0.1 into it's own branch.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/ScriptEngine/XEngine/EventManager.cs | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/OpenSim/Region/ScriptEngine/XEngine/EventManager.cs b/OpenSim/Region/ScriptEngine/XEngine/EventManager.cs index 0ff2da3..55a77bc 100644 --- a/OpenSim/Region/ScriptEngine/XEngine/EventManager.cs +++ b/OpenSim/Region/ScriptEngine/XEngine/EventManager.cs | |||
@@ -79,7 +79,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine | |||
79 | } | 79 | } |
80 | 80 | ||
81 | /// <summary> | 81 | /// <summary> |
82 | /// When an object gets paid by an avatar and generates the paid event, | 82 | /// When an object gets paid by an avatar and generates the paid event, |
83 | /// this will pipe it to the script engine | 83 | /// this will pipe it to the script engine |
84 | /// </summary> | 84 | /// </summary> |
85 | /// <param name="objectID">Object ID that got paid</param> | 85 | /// <param name="objectID">Object ID that got paid</param> |
@@ -244,7 +244,8 @@ namespace OpenSim.Region.ScriptEngine.XEngine | |||
244 | { | 244 | { |
245 | DetectParams d = new DetectParams(); | 245 | DetectParams d = new DetectParams(); |
246 | d.Key =detobj.keyUUID; | 246 | d.Key =detobj.keyUUID; |
247 | d.Populate(myScriptEngine.World); | 247 | d.Populate(myScriptEngine.World, detobj); |
248 | d.LinkNum = detobj.linkNumber; // do it here since currently linknum is collided part | ||
248 | det.Add(d); | 249 | det.Add(d); |
249 | } | 250 | } |
250 | 251 | ||
@@ -263,8 +264,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine | |||
263 | foreach (DetectedObject detobj in col.Colliders) | 264 | foreach (DetectedObject detobj in col.Colliders) |
264 | { | 265 | { |
265 | DetectParams d = new DetectParams(); | 266 | DetectParams d = new DetectParams(); |
266 | d.Key =detobj.keyUUID; | 267 | d.Populate(myScriptEngine.World, detobj); |
267 | d.Populate(myScriptEngine.World); | ||
268 | det.Add(d); | 268 | det.Add(d); |
269 | } | 269 | } |
270 | 270 | ||
@@ -282,8 +282,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine | |||
282 | foreach (DetectedObject detobj in col.Colliders) | 282 | foreach (DetectedObject detobj in col.Colliders) |
283 | { | 283 | { |
284 | DetectParams d = new DetectParams(); | 284 | DetectParams d = new DetectParams(); |
285 | d.Key =detobj.keyUUID; | 285 | d.Populate(myScriptEngine.World, detobj); |
286 | d.Populate(myScriptEngine.World); | ||
287 | det.Add(d); | 286 | det.Add(d); |
288 | } | 287 | } |
289 | 288 | ||
@@ -301,8 +300,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine | |||
301 | foreach (DetectedObject detobj in col.Colliders) | 300 | foreach (DetectedObject detobj in col.Colliders) |
302 | { | 301 | { |
303 | DetectParams d = new DetectParams(); | 302 | DetectParams d = new DetectParams(); |
304 | d.Position = detobj.posVector; | 303 | d.Populate(myScriptEngine.World, detobj); |
305 | d.Populate(myScriptEngine.World); | ||
306 | det.Add(d); | 304 | det.Add(d); |
307 | myScriptEngine.PostObjectEvent(localID, new EventParams( | 305 | myScriptEngine.PostObjectEvent(localID, new EventParams( |
308 | "land_collision_start", | 306 | "land_collision_start", |
@@ -319,8 +317,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine | |||
319 | foreach (DetectedObject detobj in col.Colliders) | 317 | foreach (DetectedObject detobj in col.Colliders) |
320 | { | 318 | { |
321 | DetectParams d = new DetectParams(); | 319 | DetectParams d = new DetectParams(); |
322 | d.Position = detobj.posVector; | 320 | d.Populate(myScriptEngine.World,detobj); |
323 | d.Populate(myScriptEngine.World); | ||
324 | det.Add(d); | 321 | det.Add(d); |
325 | myScriptEngine.PostObjectEvent(localID, new EventParams( | 322 | myScriptEngine.PostObjectEvent(localID, new EventParams( |
326 | "land_collision", | 323 | "land_collision", |
@@ -336,8 +333,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine | |||
336 | foreach (DetectedObject detobj in col.Colliders) | 333 | foreach (DetectedObject detobj in col.Colliders) |
337 | { | 334 | { |
338 | DetectParams d = new DetectParams(); | 335 | DetectParams d = new DetectParams(); |
339 | d.Position = detobj.posVector; | 336 | d.Populate(myScriptEngine.World,detobj); |
340 | d.Populate(myScriptEngine.World); | ||
341 | det.Add(d); | 337 | det.Add(d); |
342 | myScriptEngine.PostObjectEvent(localID, new EventParams( | 338 | myScriptEngine.PostObjectEvent(localID, new EventParams( |
343 | "land_collision_end", | 339 | "land_collision_end", |
@@ -412,10 +408,17 @@ namespace OpenSim.Region.ScriptEngine.XEngine | |||
412 | 408 | ||
413 | public void attach(uint localID, UUID itemID, UUID avatar) | 409 | public void attach(uint localID, UUID itemID, UUID avatar) |
414 | { | 410 | { |
415 | myScriptEngine.PostObjectEvent(localID, new EventParams( | 411 | SceneObjectGroup grp = myScriptEngine.World.GetSceneObjectGroup(localID); |
412 | if(grp == null) | ||
413 | return; | ||
414 | |||
415 | foreach(SceneObjectPart part in grp.Parts) | ||
416 | { | ||
417 | myScriptEngine.PostObjectEvent(part.LocalId, new EventParams( | ||
416 | "attach",new object[] { | 418 | "attach",new object[] { |
417 | new LSL_Types.LSLString(avatar.ToString()) }, | 419 | new LSL_Types.LSLString(avatar.ToString()) }, |
418 | new DetectParams[0])); | 420 | new DetectParams[0])); |
421 | } | ||
419 | } | 422 | } |
420 | 423 | ||
421 | // dataserver: not handled here | 424 | // dataserver: not handled here |