diff options
author | UbitUmarov | 2012-04-27 10:49:32 +0100 |
---|---|---|
committer | UbitUmarov | 2012-04-27 10:49:32 +0100 |
commit | 2006188ee5e5a7ce9cc3f879a37a49337f2e93f2 (patch) | |
tree | 51a73ff9fc31be92fe1d5953d8d566b55cc83df8 /OpenSim/Region | |
parent | test (diff) | |
download | opensim-SC_OLD-2006188ee5e5a7ce9cc3f879a37a49337f2e93f2.zip opensim-SC_OLD-2006188ee5e5a7ce9cc3f879a37a49337f2e93f2.tar.gz opensim-SC_OLD-2006188ee5e5a7ce9cc3f879a37a49337f2e93f2.tar.bz2 opensim-SC_OLD-2006188ee5e5a7ce9cc3f879a37a49337f2e93f2.tar.xz |
test
Diffstat (limited to 'OpenSim/Region')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index ef281a6..840bdef 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -1117,21 +1117,18 @@ namespace OpenSim.Region.Framework.Scenes | |||
1117 | } | 1117 | } |
1118 | else | 1118 | else |
1119 | { | 1119 | { |
1120 | if (rotateToVelXY) | ||
1121 | { | ||
1122 | float x = ((Vector3)newvel).X; | ||
1123 | float y = ((Vector3)newvel).Y; | ||
1124 | |||
1125 | x = 0.5f * (float)Math.Atan2(y, x); | ||
1126 | y = (float)Math.Cos(x); | ||
1127 | x = (float)Math.Sin(x); | ||
1128 | Rotation = new Quaternion(0f, 0f, x, y); | ||
1129 | m_log.DebugFormat("[avnLocalTeleport] final rotation {0}", Rotation); | ||
1130 | } | ||
1131 | |||
1132 | if (PhysicsActor != null) | 1120 | if (PhysicsActor != null) |
1133 | PhysicsActor.SetMomentum((Vector3)newvel); | 1121 | PhysicsActor.SetMomentum((Vector3)newvel); |
1134 | m_velocity = (Vector3)newvel; | 1122 | m_velocity = (Vector3)newvel; |
1123 | |||
1124 | if (rotateToVelXY) | ||
1125 | { | ||
1126 | Vector3 lookAt = (Vector3)newvel; | ||
1127 | lookAt.Z = 0; | ||
1128 | lookAt.Normalize(); | ||
1129 | ControllingClient.SendLocalTeleport(newpos, lookAt, (uint)TeleportFlags.ViaLocation); | ||
1130 | return; | ||
1131 | } | ||
1135 | } | 1132 | } |
1136 | } | 1133 | } |
1137 | 1134 | ||