osLocalTeleportAgent: if lookat or fly options, just move the avatar, not telling viewer about any teleport

0.9.1.0-post-fixes
UbitUmarov 2019-05-03 00:39:55 +01:00
parent 3a055c578d
commit 3ae4115e43
1 changed files with 35 additions and 30 deletions

View File

@ -1776,38 +1776,43 @@ namespace OpenSim.Region.Framework.Scenes
if (newpos.Z < posZLimit)
newpos.Z = posZLimit;
if ((flags & 8) != 0)
Flying = true;
else if ((flags & 16) != 0)
Flying = false;
uint tpflags = (uint)TeleportFlags.ViaLocation;
if(Flying)
tpflags |= (uint)TeleportFlags.IsFlying;
Vector3 lookat = Lookat;
if ((flags & 2) != 0)
if((flags & 0x1e) != 0)
{
newlookat.Z = 0;
newlookat.Normalize();
if (Math.Abs(newlookat.X) > 0.001 || Math.Abs(newlookat.Y) > 0.001)
lookat = newlookat;
}
else if((flags & 4) != 0)
{
if((flags & 1) != 0)
newlookat = newvel;
else
newlookat = m_velocity;
newlookat.Z = 0;
newlookat.Normalize();
if (Math.Abs(newlookat.X) > 0.001 || Math.Abs(newlookat.Y) > 0.001)
lookat = newlookat;
}
if ((flags & 8) != 0)
Flying = true;
else if ((flags & 16) != 0)
Flying = false;
AbsolutePosition = newpos;
ControllingClient.SendLocalTeleport(newpos, lookat, tpflags);
uint tpflags = (uint)TeleportFlags.ViaLocation;
if(Flying)
tpflags |= (uint)TeleportFlags.IsFlying;
Vector3 lookat = Lookat;
if ((flags & 2) != 0)
{
newlookat.Z = 0;
newlookat.Normalize();
if (Math.Abs(newlookat.X) > 0.001 || Math.Abs(newlookat.Y) > 0.001)
lookat = newlookat;
}
else if((flags & 4) != 0)
{
if((flags & 1) != 0)
newlookat = newvel;
else
newlookat = m_velocity;
newlookat.Z = 0;
newlookat.Normalize();
if (Math.Abs(newlookat.X) > 0.001 || Math.Abs(newlookat.Y) > 0.001)
lookat = newlookat;
}
AbsolutePosition = newpos;
ControllingClient.SendLocalTeleport(newpos, lookat, tpflags);
}
else
AbsolutePosition = newpos;
if ((flags & 1) != 0)
{