From affcdcce8b2bd59f3c7f83e38adb9e1246f7d00f Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Tue, 16 Sep 2014 21:25:06 +0100 Subject: try to send fly state on tps --- .../CoreModules/Framework/EntityTransfer/EntityTransferModule.cs | 8 ++++++++ OpenSim/Region/Framework/Scenes/ScenePresence.cs | 3 ++- 2 files changed, 10 insertions(+), 1 deletion(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs index 19c068a..b735f36 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs @@ -868,6 +868,10 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer // Let's send a full update of the agent. This is a synchronous call. AgentData agent = new AgentData(); sp.CopyTo(agent); + + if ((teleportFlags & (uint)TeleportFlags.IsFlying) != 0) + agent.ControlFlags |= (uint)AgentManager.ControlFlags.AGENT_CONTROL_FLY; + agent.Position = agentCircuit.startpos; SetCallbackURL(agent, sp.Scene.RegionInfo); @@ -1109,6 +1113,10 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer AgentData agent = new AgentData(); sp.CopyTo(agent); agent.Position = agentCircuit.startpos; + + if ((teleportFlags & (uint)TeleportFlags.IsFlying) != 0) + agent.ControlFlags |= (uint)AgentManager.ControlFlags.AGENT_CONTROL_FLY; + agent.SenderWantsToWaitForRoot = true; //SetCallbackURL(agent, sp.Scene.RegionInfo); diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index fd1bab6..dba95c7 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -4268,10 +4268,11 @@ namespace OpenSim.Region.Framework.Scenes GodLevel = cAgent.GodLevel; SetAlwaysRun = cAgent.AlwaysRun; + bool isFlying = ((m_AgentControlFlags & AgentManager.ControlFlags.AGENT_CONTROL_FLY) != 0); + Appearance = new AvatarAppearance(cAgent.Appearance); if (PhysicsActor != null) { - bool isFlying = Flying; RemoveFromPhysicalScene(); AddToPhysicalScene(isFlying); } -- cgit v1.1