diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs index 8924c0a510..083ee33399 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs @@ -699,7 +699,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer } else { - agent.InTransit(); + agent.IsInTransit = true; neighboury = b.TriggerRegionY; neighbourx = b.TriggerRegionX; @@ -722,7 +722,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer } else { - agent.InTransit(); + agent.IsInTransit = true; neighboury = ba.TriggerRegionY; neighbourx = ba.TriggerRegionX; @@ -756,7 +756,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer } else { - agent.InTransit(); + agent.IsInTransit = true; neighboury = ba.TriggerRegionY; neighbourx = ba.TriggerRegionX; @@ -788,7 +788,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer } else { - agent.InTransit(); + agent.IsInTransit = true; neighboury = b.TriggerRegionY; neighbourx = b.TriggerRegionX; @@ -876,7 +876,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer return false; } - agent.InTransit(); + agent.IsInTransit = true; CrossAgentToNewRegionDelegate d = CrossAgentToNewRegionAsync; d.BeginInvoke(agent, newpos, neighbourx, neighboury, neighbourRegion, isFlying, version, CrossAgentToNewRegionCompleted, d); @@ -1066,7 +1066,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer agent.RestoreInCurrentScene(); // In any case - agent.NotInTransit(); + agent.IsInTransit = false; //m_log.DebugFormat("[ENTITY TRANSFER MODULE]: Crossing agent {0} {1} completed.", agent.Firstname, agent.Lastname); } diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index ce63946b48..e4e5f17279 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -718,7 +718,16 @@ namespace OpenSim.Region.Framework.Scenes public bool IsInTransit { get { return m_inTransit; } - private set { m_inTransit = value; } + set { + if(value) + { + if ((PhysicsActor != null) && PhysicsActor.Flying) + m_AgentControlFlags |= AgentManager.ControlFlags.AGENT_CONTROL_FLY; + else if ((m_AgentControlFlags & AgentManager.ControlFlags.AGENT_CONTROL_FLY) != 0) + m_AgentControlFlags &= ~AgentManager.ControlFlags.AGENT_CONTROL_FLY; + } + m_inTransit = value; + } } private float m_speedModifier = 1.0f; @@ -2946,16 +2955,6 @@ namespace OpenSim.Region.Framework.Scenes } } - public void InTransit() - { - IsInTransit = true; - - if ((PhysicsActor != null) && PhysicsActor.Flying) - m_AgentControlFlags |= AgentManager.ControlFlags.AGENT_CONTROL_FLY; - else if ((m_AgentControlFlags & AgentManager.ControlFlags.AGENT_CONTROL_FLY) != 0) - m_AgentControlFlags &= ~AgentManager.ControlFlags.AGENT_CONTROL_FLY; - } - public void NotInTransit() { IsInTransit = false;