Simplified IsInTransit property on ScenePresence and removed InTransit() which called IsInTransit=true which called m_inTransit=true. Also removed NotInTransit().

remove-scene-viewer
Dan Lake 2011-10-06 12:39:19 -07:00
parent 08f264d096
commit 9a16e76f51
2 changed files with 16 additions and 17 deletions

View File

@ -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);
}

View File

@ -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;