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(). --- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) (limited to 'OpenSim/Region/Framework') 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