From 61e99fba87ce6e353a459ba77ae1afae9d41039c Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Fri, 27 Apr 2012 01:18:30 +0100 Subject: TEST more options to avnLocalTeleport --- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index d8203dd..d53e5c3 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -1099,7 +1099,7 @@ namespace OpenSim.Region.Framework.Scenes SendTerseUpdateToAllClients(); } - public void avnLocalTeleport(Vector3 newpos, Quaternion? newrot, bool Stopped) + public void avnLocalTeleport(Vector3 newpos, Quaternion? newrot,Vector3? v, bool Stopit) { CheckLandingPoint(ref newpos); AbsolutePosition = newpos; @@ -1109,11 +1109,16 @@ namespace OpenSim.Region.Framework.Scenes // TODO } - if (Stopped) + if (v.HasValue) { - if (PhysicsActor != null) // speed up physics stop + if (PhysicsActor != null) + PhysicsActor.SetMomentum((Vector3)v); + } + else if (Stopit) + { + if (PhysicsActor != null) // speedup PhysicsActor.SetMomentum(Vector3.Zero); - Velocity = Vector3.Zero; + Velocity = Vector3.Zero; // zero any velocity request } SendTerseUpdateToAllClients(); -- cgit v1.1