aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/ScenePresence.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs35
1 files changed, 35 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index 311ba6a..1e717d9 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -1088,6 +1088,41 @@ namespace OpenSim.Region.Framework.Scenes
1088 SendTerseUpdateToAllClients(); 1088 SendTerseUpdateToAllClients();
1089 } 1089 }
1090 1090
1091 public void avnLocalTeleport(Vector3 newpos, Vector3? newvel, bool rotateToVelXY)
1092 {
1093 CheckLandingPoint(ref newpos);
1094 AbsolutePosition = newpos;
1095
1096 if (newvel.HasValue)
1097 {
1098 if ((Vector3)newvel == Vector3.Zero)
1099 {
1100 if (PhysicsActor != null)
1101 PhysicsActor.SetMomentum(Vector3.Zero);
1102 m_velocity = Vector3.Zero;
1103 }
1104 else
1105 {
1106 if (PhysicsActor != null)
1107 PhysicsActor.SetMomentum((Vector3)newvel);
1108 m_velocity = (Vector3)newvel;
1109
1110 if (rotateToVelXY)
1111 {
1112 Vector3 lookAt = (Vector3)newvel;
1113 lookAt.Z = 0;
1114 lookAt.Normalize();
1115 ControllingClient.SendLocalTeleport(newpos, lookAt, (uint)TeleportFlags.ViaLocation);
1116 return;
1117 }
1118 }
1119 }
1120
1121 SendTerseUpdateToAllClients();
1122 }
1123
1124
1125
1091 public void StopFlying() 1126 public void StopFlying()
1092 { 1127 {
1093 ControllingClient.StopFlying(this); 1128 ControllingClient.StopFlying(this);