diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 8ac09e9aec..121179219e 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -1075,6 +1075,11 @@ namespace OpenSim.Region.Framework.Scenes } public void TeleportWithMomentum(Vector3 pos) + { + TeleportWithMomentum(pos, null); + } + + public void TeleportWithMomentum(Vector3 pos, Vector3? v) { bool isFlying = Flying; Vector3 vel = Velocity; @@ -1083,7 +1088,12 @@ namespace OpenSim.Region.Framework.Scenes AbsolutePosition = pos; AddToPhysicalScene(isFlying); if (PhysicsActor != null) - PhysicsActor.SetMomentum(vel); + { + if (v.HasValue) + PhysicsActor.SetMomentum((Vector3)v); + else + PhysicsActor.SetMomentum(vel); + } SendTerseUpdateToAllClients(); }