diff options
author | UbitUmarov | 2017-04-04 00:30:19 +0100 |
---|---|---|
committer | UbitUmarov | 2017-04-04 00:30:19 +0100 |
commit | c6150c206618fe50a45bd8673e010f862147daba (patch) | |
tree | 978341eee14c7ad2f0e30360f313dd484bd3555d /OpenSim/Region | |
parent | oops (diff) | |
download | opensim-SC_OLD-c6150c206618fe50a45bd8673e010f862147daba.zip opensim-SC_OLD-c6150c206618fe50a45bd8673e010f862147daba.tar.gz opensim-SC_OLD-c6150c206618fe50a45bd8673e010f862147daba.tar.bz2 opensim-SC_OLD-c6150c206618fe50a45bd8673e010f862147daba.tar.xz |
mantis 8140: fix objectTeleport rotation if stop TRUE
Diffstat (limited to 'OpenSim/Region')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index 402e5f7..24cdc7a 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | |||
@@ -900,11 +900,19 @@ namespace OpenSim.Region.Framework.Scenes | |||
900 | } | 900 | } |
901 | } | 901 | } |
902 | 902 | ||
903 | rotation.Normalize(); | ||
903 | if(stop) | 904 | if(stop) |
905 | { | ||
904 | RootPart.Stop(); | 906 | RootPart.Stop(); |
907 | if(Math.Abs(rotation.W) < 0.999) | ||
908 | { | ||
909 | Quaternion rot = RootPart.RotationOffset; | ||
910 | rot *= rotation; | ||
911 | RootPart.RotationOffset = rot; | ||
912 | } | ||
913 | } | ||
905 | else | 914 | else |
906 | { | 915 | { |
907 | rotation.Normalize(); | ||
908 | if(Math.Abs(rotation.W) < 0.999) | 916 | if(Math.Abs(rotation.W) < 0.999) |
909 | { | 917 | { |
910 | Quaternion rot = RootPart.RotationOffset; | 918 | Quaternion rot = RootPart.RotationOffset; |