aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs12
1 files changed, 11 insertions, 1 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index 8ac09e9..1211792 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -1076,6 +1076,11 @@ namespace OpenSim.Region.Framework.Scenes
1076 1076
1077 public void TeleportWithMomentum(Vector3 pos) 1077 public void TeleportWithMomentum(Vector3 pos)
1078 { 1078 {
1079 TeleportWithMomentum(pos, null);
1080 }
1081
1082 public void TeleportWithMomentum(Vector3 pos, Vector3? v)
1083 {
1079 bool isFlying = Flying; 1084 bool isFlying = Flying;
1080 Vector3 vel = Velocity; 1085 Vector3 vel = Velocity;
1081 RemoveFromPhysicalScene(); 1086 RemoveFromPhysicalScene();
@@ -1083,7 +1088,12 @@ namespace OpenSim.Region.Framework.Scenes
1083 AbsolutePosition = pos; 1088 AbsolutePosition = pos;
1084 AddToPhysicalScene(isFlying); 1089 AddToPhysicalScene(isFlying);
1085 if (PhysicsActor != null) 1090 if (PhysicsActor != null)
1086 PhysicsActor.SetMomentum(vel); 1091 {
1092 if (v.HasValue)
1093 PhysicsActor.SetMomentum((Vector3)v);
1094 else
1095 PhysicsActor.SetMomentum(vel);
1096 }
1087 1097
1088 SendTerseUpdateToAllClients(); 1098 SendTerseUpdateToAllClients();
1089 } 1099 }