From 9a16e76f5151c11fbf76e41b89f8eb03b1731828 Mon Sep 17 00:00:00 2001 From: Dan Lake Date: Thu, 6 Oct 2011 12:39:19 -0700 Subject: Simplified IsInTransit property on ScenePresence and removed InTransit() which called IsInTransit=true which called m_inTransit=true. Also removed NotInTransit(). --- .../EntityTransfer/EntityTransferModule.cs | 12 ++++++------ OpenSim/Region/Framework/Scenes/ScenePresence.cs | 21 ++++++++++----------- 2 files changed, 16 insertions(+), 17 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs index 8924c0a..083ee33 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 ce63946..e4e5f17 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; -- cgit v1.1