TEST more options to avnLocalTeleport

avinationmerge
UbitUmarov 2012-04-27 01:18:30 +01:00
parent 2cf6023892
commit 61e99fba87
1 changed files with 9 additions and 4 deletions

View File

@ -1099,7 +1099,7 @@ namespace OpenSim.Region.Framework.Scenes
SendTerseUpdateToAllClients(); SendTerseUpdateToAllClients();
} }
public void avnLocalTeleport(Vector3 newpos, Quaternion? newrot, bool Stopped) public void avnLocalTeleport(Vector3 newpos, Quaternion? newrot,Vector3? v, bool Stopit)
{ {
CheckLandingPoint(ref newpos); CheckLandingPoint(ref newpos);
AbsolutePosition = newpos; AbsolutePosition = newpos;
@ -1109,11 +1109,16 @@ namespace OpenSim.Region.Framework.Scenes
// TODO // 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); PhysicsActor.SetMomentum(Vector3.Zero);
Velocity = Vector3.Zero; Velocity = Vector3.Zero; // zero any velocity request
} }
SendTerseUpdateToAllClients(); SendTerseUpdateToAllClients();