try to send fly state on tps

avinationmerge
UbitUmarov 2014-09-16 21:25:06 +01:00
parent d43d3df724
commit affcdcce8b
2 changed files with 10 additions and 1 deletions

View File

@ -868,6 +868,10 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
// Let's send a full update of the agent. This is a synchronous call. // Let's send a full update of the agent. This is a synchronous call.
AgentData agent = new AgentData(); AgentData agent = new AgentData();
sp.CopyTo(agent); sp.CopyTo(agent);
if ((teleportFlags & (uint)TeleportFlags.IsFlying) != 0)
agent.ControlFlags |= (uint)AgentManager.ControlFlags.AGENT_CONTROL_FLY;
agent.Position = agentCircuit.startpos; agent.Position = agentCircuit.startpos;
SetCallbackURL(agent, sp.Scene.RegionInfo); SetCallbackURL(agent, sp.Scene.RegionInfo);
@ -1109,6 +1113,10 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
AgentData agent = new AgentData(); AgentData agent = new AgentData();
sp.CopyTo(agent); sp.CopyTo(agent);
agent.Position = agentCircuit.startpos; agent.Position = agentCircuit.startpos;
if ((teleportFlags & (uint)TeleportFlags.IsFlying) != 0)
agent.ControlFlags |= (uint)AgentManager.ControlFlags.AGENT_CONTROL_FLY;
agent.SenderWantsToWaitForRoot = true; agent.SenderWantsToWaitForRoot = true;
//SetCallbackURL(agent, sp.Scene.RegionInfo); //SetCallbackURL(agent, sp.Scene.RegionInfo);

View File

@ -4268,10 +4268,11 @@ namespace OpenSim.Region.Framework.Scenes
GodLevel = cAgent.GodLevel; GodLevel = cAgent.GodLevel;
SetAlwaysRun = cAgent.AlwaysRun; SetAlwaysRun = cAgent.AlwaysRun;
bool isFlying = ((m_AgentControlFlags & AgentManager.ControlFlags.AGENT_CONTROL_FLY) != 0);
Appearance = new AvatarAppearance(cAgent.Appearance); Appearance = new AvatarAppearance(cAgent.Appearance);
if (PhysicsActor != null) if (PhysicsActor != null)
{ {
bool isFlying = Flying;
RemoveFromPhysicalScene(); RemoveFromPhysicalScene();
AddToPhysicalScene(isFlying); AddToPhysicalScene(isFlying);
} }