diff options
author | UbitUmarov | 2014-08-12 20:59:36 +0100 |
---|---|---|
committer | UbitUmarov | 2014-08-12 20:59:36 +0100 |
commit | bf269c871adb13915c510f6471028df2cce657b7 (patch) | |
tree | 525caecd143531c92e0aae94d46eca609936b7af /OpenSim | |
parent | try no send current LookAt, remove redundant incomplete position height (diff) | |
download | opensim-SC-bf269c871adb13915c510f6471028df2cce657b7.zip opensim-SC-bf269c871adb13915c510f6471028df2cce657b7.tar.gz opensim-SC-bf269c871adb13915c510f6471028df2cce657b7.tar.bz2 opensim-SC-bf269c871adb13915c510f6471028df2cce657b7.tar.xz |
use Vector3.normalize in place of util.GetNormalize
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index c49559a..77d74ee 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -530,11 +530,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
530 | get | 530 | get |
531 | { | 531 | { |
532 | Vector3 a = new Vector3(CameraAtAxis.X, CameraAtAxis.Y, 0); | 532 | Vector3 a = new Vector3(CameraAtAxis.X, CameraAtAxis.Y, 0); |
533 | 533 | a.Normalize(); | |
534 | if (a == Vector3.Zero) | 534 | return a; |
535 | return a; | ||
536 | |||
537 | return Util.GetNormalizedVector(a); | ||
538 | } | 535 | } |
539 | } | 536 | } |
540 | #endregion | 537 | #endregion |
@@ -1796,7 +1793,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1796 | { | 1793 | { |
1797 | look = Velocity; | 1794 | look = Velocity; |
1798 | look.Z = 0; | 1795 | look.Z = 0; |
1799 | look = Util.GetNormalizedVector(look); | 1796 | look.Normalize(); |
1800 | if ((Math.Abs(look.X) < 0.01) && (Math.Abs(look.Y) < 0.01) ) | 1797 | if ((Math.Abs(look.X) < 0.01) && (Math.Abs(look.Y) < 0.01) ) |
1801 | look = new Vector3(0.99f, 0.042f, 0); | 1798 | look = new Vector3(0.99f, 0.042f, 0); |
1802 | } | 1799 | } |