diff options
author | Diva Canto | 2012-04-24 22:17:52 -0700 |
---|---|---|
committer | Diva Canto | 2012-04-24 22:17:52 -0700 |
commit | fd281ded3fe341f7ce994171beb5ff12b154a761 (patch) | |
tree | 5a873cc862bb60803808e8bbb3a9058411b4f102 | |
parent | HG: Moved User-level code down to the HGEntityTransferModule where it belongs. (diff) | |
parent | Merge branch 'master' of melanie@opensimulator.org:/var/git/opensim (diff) | |
download | opensim-SC_OLD-fd281ded3fe341f7ce994171beb5ff12b154a761.zip opensim-SC_OLD-fd281ded3fe341f7ce994171beb5ff12b154a761.tar.gz opensim-SC_OLD-fd281ded3fe341f7ce994171beb5ff12b154a761.tar.bz2 opensim-SC_OLD-fd281ded3fe341f7ce994171beb5ff12b154a761.tar.xz |
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
-rw-r--r-- | OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs | 1 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 13 |
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 | } |