diff options
author | Justin Clark-Casey (justincc) | 2011-08-27 00:15:21 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2011-08-27 00:15:21 +0100 |
commit | 33a894f3d2cc95a7a512b86f39f3c6a6afabb015 (patch) | |
tree | 064edbd623ea0bd7bb85c29dc28d2348feb8454b /OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins | |
parent | refactor: simplify SOP.AttachedAvatar into SOG.AttachedAvatar (diff) | |
download | opensim-SC_OLD-33a894f3d2cc95a7a512b86f39f3c6a6afabb015.zip opensim-SC_OLD-33a894f3d2cc95a7a512b86f39f3c6a6afabb015.tar.gz opensim-SC_OLD-33a894f3d2cc95a7a512b86f39f3c6a6afabb015.tar.bz2 opensim-SC_OLD-33a894f3d2cc95a7a512b86f39f3c6a6afabb015.tar.xz |
refactor: move SOP.IsAttachment and AttachmentPoint up into SOG to avoid pointless duplication of identical values
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs index bf74760..4ac7f8b 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs | |||
@@ -303,7 +303,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins | |||
303 | float dz; | 303 | float dz; |
304 | 304 | ||
305 | Quaternion q = SensePoint.RotationOffset; | 305 | Quaternion q = SensePoint.RotationOffset; |
306 | if (SensePoint.ParentGroup.RootPart.IsAttachment) | 306 | if (SensePoint.ParentGroup.IsAttachment) |
307 | { | 307 | { |
308 | // In attachments, the sensor cone always orients with the | 308 | // In attachments, the sensor cone always orients with the |
309 | // avatar rotation. This may include a nonzero elevation if | 309 | // avatar rotation. This may include a nonzero elevation if |
@@ -352,7 +352,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins | |||
352 | objtype = 0; | 352 | objtype = 0; |
353 | 353 | ||
354 | part = ((SceneObjectGroup)ent).RootPart; | 354 | part = ((SceneObjectGroup)ent).RootPart; |
355 | if (part.AttachmentPoint != 0) // Attached so ignore | 355 | if (part.ParentGroup.AttachmentPoint != 0) // Attached so ignore |
356 | continue; | 356 | continue; |
357 | 357 | ||
358 | if (part.Inventory.ContainsScripts()) | 358 | if (part.Inventory.ContainsScripts()) |
@@ -423,7 +423,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins | |||
423 | Vector3 fromRegionPos = SensePoint.AbsolutePosition; | 423 | Vector3 fromRegionPos = SensePoint.AbsolutePosition; |
424 | 424 | ||
425 | Quaternion q = SensePoint.RotationOffset; | 425 | Quaternion q = SensePoint.RotationOffset; |
426 | if (SensePoint.ParentGroup.RootPart.IsAttachment) | 426 | if (SensePoint.ParentGroup.IsAttachment) |
427 | { | 427 | { |
428 | // In attachments, the sensor cone always orients with the | 428 | // In attachments, the sensor cone always orients with the |
429 | // avatar rotation. This may include a nonzero elevation if | 429 | // avatar rotation. This may include a nonzero elevation if |
@@ -435,7 +435,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins | |||
435 | LSL_Types.Quaternion r = new LSL_Types.Quaternion(q.X, q.Y, q.Z, q.W); | 435 | LSL_Types.Quaternion r = new LSL_Types.Quaternion(q.X, q.Y, q.Z, q.W); |
436 | LSL_Types.Vector3 forward_dir = (new LSL_Types.Vector3(1, 0, 0) * r); | 436 | LSL_Types.Vector3 forward_dir = (new LSL_Types.Vector3(1, 0, 0) * r); |
437 | double mag_fwd = LSL_Types.Vector3.Mag(forward_dir); | 437 | double mag_fwd = LSL_Types.Vector3.Mag(forward_dir); |
438 | bool attached = (SensePoint.AttachmentPoint != 0); | 438 | bool attached = (SensePoint.ParentGroup.AttachmentPoint != 0); |
439 | Vector3 toRegionPos; | 439 | Vector3 toRegionPos; |
440 | double dis; | 440 | double dis; |
441 | 441 | ||