diff options
author | teravus | 2012-11-15 10:05:16 -0500 |
---|---|---|
committer | teravus | 2012-11-15 10:05:16 -0500 |
commit | e9153e1d1aae50024d8cd05fe14a9bce34343a0e (patch) | |
tree | bc111d34f95a26b99c7e34d9e495dc14d1802cc3 /OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs | |
parent | Merge master into teravuswork (diff) | |
download | opensim-SC-e9153e1d1aae50024d8cd05fe14a9bce34343a0e.zip opensim-SC-e9153e1d1aae50024d8cd05fe14a9bce34343a0e.tar.gz opensim-SC-e9153e1d1aae50024d8cd05fe14a9bce34343a0e.tar.bz2 opensim-SC-e9153e1d1aae50024d8cd05fe14a9bce34343a0e.tar.xz |
Revert "Merge master into teravuswork", it should have been avination, not master.
This reverts commit dfac269032300872c4d0dc507f4f9062d102b0f4, reversing
changes made to 619c39e5144f15aca129d6d999bcc5c34133ee64.
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs index 4dd795d..678f9d5 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs | |||
@@ -352,7 +352,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins | |||
352 | q = avatar.Rotation; | 352 | q = avatar.Rotation; |
353 | } | 353 | } |
354 | 354 | ||
355 | LSL_Types.Quaternion r = new LSL_Types.Quaternion(q); | 355 | LSL_Types.Quaternion r = new LSL_Types.Quaternion(q.X, q.Y, q.Z, q.W); |
356 | LSL_Types.Vector3 forward_dir = (new LSL_Types.Vector3(1, 0, 0) * r); | 356 | LSL_Types.Vector3 forward_dir = (new LSL_Types.Vector3(1, 0, 0) * r); |
357 | double mag_fwd = LSL_Types.Vector3.Mag(forward_dir); | 357 | double mag_fwd = LSL_Types.Vector3.Mag(forward_dir); |
358 | 358 | ||
@@ -429,8 +429,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins | |||
429 | try | 429 | try |
430 | { | 430 | { |
431 | Vector3 diff = toRegionPos - fromRegionPos; | 431 | Vector3 diff = toRegionPos - fromRegionPos; |
432 | double dot = LSL_Types.Vector3.Dot(forward_dir, diff); | 432 | LSL_Types.Vector3 obj_dir = new LSL_Types.Vector3(diff.X, diff.Y, diff.Z); |
433 | double mag_obj = LSL_Types.Vector3.Mag(diff); | 433 | double dot = LSL_Types.Vector3.Dot(forward_dir, obj_dir); |
434 | double mag_obj = LSL_Types.Vector3.Mag(obj_dir); | ||
434 | ang_obj = Math.Acos(dot / (mag_fwd * mag_obj)); | 435 | ang_obj = Math.Acos(dot / (mag_fwd * mag_obj)); |
435 | } | 436 | } |
436 | catch | 437 | catch |
@@ -482,7 +483,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins | |||
482 | q = avatar.Rotation; | 483 | q = avatar.Rotation; |
483 | } | 484 | } |
484 | 485 | ||
485 | LSL_Types.Quaternion r = new LSL_Types.Quaternion(q); | 486 | LSL_Types.Quaternion r = new LSL_Types.Quaternion(q.X, q.Y, q.Z, q.W); |
486 | LSL_Types.Vector3 forward_dir = (new LSL_Types.Vector3(1, 0, 0) * r); | 487 | LSL_Types.Vector3 forward_dir = (new LSL_Types.Vector3(1, 0, 0) * r); |
487 | double mag_fwd = LSL_Types.Vector3.Mag(forward_dir); | 488 | double mag_fwd = LSL_Types.Vector3.Mag(forward_dir); |
488 | bool attached = (SensePoint.ParentGroup.AttachmentPoint != 0); | 489 | bool attached = (SensePoint.ParentGroup.AttachmentPoint != 0); |
@@ -563,8 +564,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins | |||
563 | double ang_obj = 0; | 564 | double ang_obj = 0; |
564 | try | 565 | try |
565 | { | 566 | { |
566 | LSL_Types.Vector3 obj_dir = new LSL_Types.Vector3( | 567 | Vector3 diff = toRegionPos - fromRegionPos; |
567 | toRegionPos - fromRegionPos); | 568 | LSL_Types.Vector3 obj_dir = new LSL_Types.Vector3(diff.X, diff.Y, diff.Z); |
568 | double dot = LSL_Types.Vector3.Dot(forward_dir, obj_dir); | 569 | double dot = LSL_Types.Vector3.Dot(forward_dir, obj_dir); |
569 | double mag_obj = LSL_Types.Vector3.Mag(obj_dir); | 570 | double mag_obj = LSL_Types.Vector3.Mag(obj_dir); |
570 | ang_obj = Math.Acos(dot / (mag_fwd * mag_obj)); | 571 | ang_obj = Math.Acos(dot / (mag_fwd * mag_obj)); |