aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs1
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs13
2 files changed, 13 insertions, 1 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
index 8d810fc..a36d0fe 100644
--- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
@@ -212,6 +212,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
212 sp.ControllingClient.SendTeleportStart(teleportFlags); 212 sp.ControllingClient.SendTeleportStart(teleportFlags);
213 213
214 sp.ControllingClient.SendLocalTeleport(position, lookAt, teleportFlags); 214 sp.ControllingClient.SendLocalTeleport(position, lookAt, teleportFlags);
215 sp.Velocity = Vector3.Zero;
215 sp.Teleport(position); 216 sp.Teleport(position);
216 217
217 foreach (SceneObjectGroup grp in sp.GetAttachments()) 218 foreach (SceneObjectGroup grp in sp.GetAttachments())
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index 8cb4921..e8178ce 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -990,13 +990,24 @@ namespace OpenSim.Region.Framework.Scenes
990 /// <param name="pos"></param> 990 /// <param name="pos"></param>
991 public void Teleport(Vector3 pos) 991 public void Teleport(Vector3 pos)
992 { 992 {
993// m_log.DebugFormat("[SCENE PRESENCE]: Moving {0} to {1} in {2}", Name, pos, Scene.RegionInfo.RegionName); 993 TeleportWithMomentum(pos, null);
994 }
994 995
996 public void TeleportWithMomentum(Vector3 pos, Vector3? v)
997 {
995 bool isFlying = Flying; 998 bool isFlying = Flying;
999 Vector3 vel = Velocity;
996 RemoveFromPhysicalScene(); 1000 RemoveFromPhysicalScene();
997 CheckLandingPoint(ref pos); 1001 CheckLandingPoint(ref pos);
998 AbsolutePosition = pos; 1002 AbsolutePosition = pos;
999 AddToPhysicalScene(isFlying); 1003 AddToPhysicalScene(isFlying);
1004 if (PhysicsActor != null)
1005 {
1006 if (v.HasValue)
1007 PhysicsActor.SetMomentum((Vector3)v);
1008 else
1009 PhysicsActor.SetMomentum(vel);
1010 }
1000 1011
1001 SendTerseUpdateToAllClients(); 1012 SendTerseUpdateToAllClients();
1002 } 1013 }