Merge commit '9a16e76f5151c11fbf76e41b89f8eb03b1731828' into bigmerge

avinationmerge
Melanie 2011-10-12 07:02:36 +01:00
commit 265e9d094d
2 changed files with 16 additions and 17 deletions

View File

@ -718,7 +718,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
} }
else else
{ {
agent.InTransit(); agent.IsInTransit = true;
neighboury = b.TriggerRegionY; neighboury = b.TriggerRegionY;
neighbourx = b.TriggerRegionX; neighbourx = b.TriggerRegionX;
@ -741,7 +741,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
} }
else else
{ {
agent.InTransit(); agent.IsInTransit = true;
neighboury = ba.TriggerRegionY; neighboury = ba.TriggerRegionY;
neighbourx = ba.TriggerRegionX; neighbourx = ba.TriggerRegionX;
@ -775,7 +775,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
} }
else else
{ {
agent.InTransit(); agent.IsInTransit = true;
neighboury = ba.TriggerRegionY; neighboury = ba.TriggerRegionY;
neighbourx = ba.TriggerRegionX; neighbourx = ba.TriggerRegionX;
@ -807,7 +807,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
} }
else else
{ {
agent.InTransit(); agent.IsInTransit = true;
neighboury = b.TriggerRegionY; neighboury = b.TriggerRegionY;
neighbourx = b.TriggerRegionX; neighbourx = b.TriggerRegionX;
@ -895,7 +895,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
return false; return false;
} }
agent.InTransit(); agent.IsInTransit = true;
CrossAgentToNewRegionDelegate d = CrossAgentToNewRegionAsync; CrossAgentToNewRegionDelegate d = CrossAgentToNewRegionAsync;
d.BeginInvoke(agent, newpos, neighbourx, neighboury, neighbourRegion, isFlying, version, CrossAgentToNewRegionCompleted, d); d.BeginInvoke(agent, newpos, neighbourx, neighboury, neighbourRegion, isFlying, version, CrossAgentToNewRegionCompleted, d);
@ -1089,7 +1089,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
agent.RestoreInCurrentScene(); agent.RestoreInCurrentScene();
// In any case // In any case
agent.NotInTransit(); agent.IsInTransit = false;
//m_log.DebugFormat("[ENTITY TRANSFER MODULE]: Crossing agent {0} {1} completed.", agent.Firstname, agent.Lastname); //m_log.DebugFormat("[ENTITY TRANSFER MODULE]: Crossing agent {0} {1} completed.", agent.Firstname, agent.Lastname);
} }

View File

@ -782,7 +782,16 @@ namespace OpenSim.Region.Framework.Scenes
public bool IsInTransit public bool IsInTransit
{ {
get { return m_inTransit; } 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; private float m_speedModifier = 1.0f;
@ -3298,16 +3307,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() public void NotInTransit()
{ {
IsInTransit = false; IsInTransit = false;