diff options
author | Justin Clark-Casey (justincc) | 2012-04-25 02:07:55 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2012-04-25 02:07:55 +0100 |
commit | 683cfc6f827c15ee70e4651cbcc7b94a01d2f8e3 (patch) | |
tree | 230b1011530c1a7455ae4c6cb855e62a49b69266 /OpenSim/Region/Framework/Scenes/ScenePresence.cs | |
parent | Add regression test TestSameRegionTeleport() (diff) | |
download | opensim-SC_OLD-683cfc6f827c15ee70e4651cbcc7b94a01d2f8e3.zip opensim-SC_OLD-683cfc6f827c15ee70e4651cbcc7b94a01d2f8e3.tar.gz opensim-SC_OLD-683cfc6f827c15ee70e4651cbcc7b94a01d2f8e3.tar.bz2 opensim-SC_OLD-683cfc6f827c15ee70e4651cbcc7b94a01d2f8e3.tar.xz |
refactor: Combine ScenePresence.Teleport() and TeleportWithMomentum()
These are identical apart from setting Velocity = zero, which has no practical effect anyway since this is zeroed when the avatar is added back to the physics scene.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 9005acd..8cb4921 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -994,22 +994,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
994 | 994 | ||
995 | bool isFlying = Flying; | 995 | bool isFlying = Flying; |
996 | RemoveFromPhysicalScene(); | 996 | RemoveFromPhysicalScene(); |
997 | Velocity = Vector3.Zero; | ||
998 | CheckLandingPoint(ref pos); | ||
999 | AbsolutePosition = pos; | ||
1000 | AddToPhysicalScene(isFlying); | ||
1001 | |||
1002 | SendTerseUpdateToAllClients(); | ||
1003 | } | ||
1004 | |||
1005 | public void TeleportWithMomentum(Vector3 pos) | ||
1006 | { | ||
1007 | // m_log.DebugFormat( | ||
1008 | // "[SCENE PRESENCE]: Moving {0} to {1} with existing momentum {2} in {3} ", | ||
1009 | // Name, pos, Velocity, Scene.RegionInfo.RegionName); | ||
1010 | |||
1011 | bool isFlying = Flying; | ||
1012 | RemoveFromPhysicalScene(); | ||
1013 | CheckLandingPoint(ref pos); | 997 | CheckLandingPoint(ref pos); |
1014 | AbsolutePosition = pos; | 998 | AbsolutePosition = pos; |
1015 | AddToPhysicalScene(isFlying); | 999 | AddToPhysicalScene(isFlying); |