aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2012-04-25 02:07:55 +0100
committerJustin Clark-Casey (justincc)2012-04-25 02:07:55 +0100
commit683cfc6f827c15ee70e4651cbcc7b94a01d2f8e3 (patch)
tree230b1011530c1a7455ae4c6cb855e62a49b69266 /OpenSim
parentAdd regression test TestSameRegionTeleport() (diff)
downloadopensim-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 'OpenSim')
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs16
-rw-r--r--OpenSim/Region/OptionalModules/Scripting/Minimodule/SPAvatar.cs2
2 files changed, 1 insertions, 17 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);
diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/SPAvatar.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/SPAvatar.cs
index 922eaaf..d192309 100644
--- a/OpenSim/Region/OptionalModules/Scripting/Minimodule/SPAvatar.cs
+++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/SPAvatar.cs
@@ -68,7 +68,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
68 public Vector3 WorldPosition 68 public Vector3 WorldPosition
69 { 69 {
70 get { return GetSP().AbsolutePosition; } 70 get { return GetSP().AbsolutePosition; }
71 set { GetSP().TeleportWithMomentum(value); } 71 set { GetSP().Teleport(value); }
72 } 72 }
73 73
74 public bool IsChildAgent 74 public bool IsChildAgent