diff options
author | Melanie | 2012-08-18 13:57:50 +0100 |
---|---|---|
committer | Melanie | 2012-08-18 13:57:50 +0100 |
commit | 5d43e27de29c104c3026b3c64ac3cc684f6353f2 (patch) | |
tree | 25b2e737c25fd168eb28e9b8e082f993844329c3 /OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins | |
parent | Merge branch 'master' into careminster (diff) | |
parent | refactoring for Vector3 operator & constructor tweaks (diff) | |
download | opensim-SC-5d43e27de29c104c3026b3c64ac3cc684f6353f2.zip opensim-SC-5d43e27de29c104c3026b3c64ac3cc684f6353f2.tar.gz opensim-SC-5d43e27de29c104c3026b3c64ac3cc684f6353f2.tar.bz2 opensim-SC-5d43e27de29c104c3026b3c64ac3cc684f6353f2.tar.xz |
Merge branch 'master' into careminster
Conflicts:
OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs index 678f9d5..8b3be4a 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs | |||
@@ -429,9 +429,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins | |||
429 | try | 429 | try |
430 | { | 430 | { |
431 | Vector3 diff = toRegionPos - fromRegionPos; | 431 | Vector3 diff = toRegionPos - fromRegionPos; |
432 | LSL_Types.Vector3 obj_dir = new LSL_Types.Vector3(diff.X, diff.Y, diff.Z); | 432 | double dot = LSL_Types.Vector3.Dot(forward_dir, diff); |
433 | double dot = LSL_Types.Vector3.Dot(forward_dir, obj_dir); | 433 | double mag_obj = LSL_Types.Vector3.Mag(diff); |
434 | double mag_obj = LSL_Types.Vector3.Mag(obj_dir); | ||
435 | ang_obj = Math.Acos(dot / (mag_fwd * mag_obj)); | 434 | ang_obj = Math.Acos(dot / (mag_fwd * mag_obj)); |
436 | } | 435 | } |
437 | catch | 436 | catch |
@@ -564,8 +563,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins | |||
564 | double ang_obj = 0; | 563 | double ang_obj = 0; |
565 | try | 564 | try |
566 | { | 565 | { |
567 | Vector3 diff = toRegionPos - fromRegionPos; | 566 | LSL_Types.Vector3 obj_dir = new LSL_Types.Vector3( |
568 | LSL_Types.Vector3 obj_dir = new LSL_Types.Vector3(diff.X, diff.Y, diff.Z); | 567 | toRegionPos - fromRegionPos); |
569 | double dot = LSL_Types.Vector3.Dot(forward_dir, obj_dir); | 568 | double dot = LSL_Types.Vector3.Dot(forward_dir, obj_dir); |
570 | double mag_obj = LSL_Types.Vector3.Mag(obj_dir); | 569 | double mag_obj = LSL_Types.Vector3.Mag(obj_dir); |
571 | ang_obj = Math.Acos(dot / (mag_fwd * mag_obj)); | 570 | ang_obj = Math.Acos(dot / (mag_fwd * mag_obj)); |