Fixes height on Basic Physics in local teleports. Plus some small refactoring.

GenericGridServerConcept
diva 2009-02-18 20:10:40 +00:00
parent d971b9f06b
commit 2a13e046db
2 changed files with 18 additions and 2 deletions

View File

@ -1195,7 +1195,8 @@ namespace OpenSim.Region.Framework.Scenes
} }
agent.RestoreInCurrentScene(); agent.RestoreInCurrentScene();
} }
agent.IsInTransit = false; // In any case
agent.NotInTransit();
//m_log.DebugFormat("[SCENE COMM]: Crossing agent {0} {1} completed.", agent.Firstname, agent.Lastname); //m_log.DebugFormat("[SCENE COMM]: Crossing agent {0} {1} completed.", agent.Firstname, agent.Lastname);
} }

View File

@ -934,6 +934,12 @@ namespace OpenSim.Region.Framework.Scenes
Velocity = new Vector3(0, 0, 0); Velocity = new Vector3(0, 0, 0);
AbsolutePosition = pos; AbsolutePosition = pos;
AddToPhysicalScene(isFlying); AddToPhysicalScene(isFlying);
if (m_appearance != null)
{
if (m_appearance.AvatarHeight > 0)
SetHeight(m_appearance.AvatarHeight);
}
SendTerseUpdateToAllClients(); SendTerseUpdateToAllClients();
} }
@ -2437,6 +2443,12 @@ namespace OpenSim.Region.Framework.Scenes
/// set them to a child agent. /// set them to a child agent.
/// </summary> /// </summary>
protected void CrossToNewRegion() protected void CrossToNewRegion()
{
InTransit();
m_scene.CrossAgentToNewRegion(this, m_physicsActor.Flying);
}
public void InTransit()
{ {
m_inTransit = true; m_inTransit = true;
@ -2444,8 +2456,11 @@ namespace OpenSim.Region.Framework.Scenes
m_AgentControlFlags |= (uint)AgentManager.ControlFlags.AGENT_CONTROL_FLY; m_AgentControlFlags |= (uint)AgentManager.ControlFlags.AGENT_CONTROL_FLY;
else if ((m_AgentControlFlags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_FLY) != 0) else if ((m_AgentControlFlags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_FLY) != 0)
m_AgentControlFlags &= ~(uint)AgentManager.ControlFlags.AGENT_CONTROL_FLY; m_AgentControlFlags &= ~(uint)AgentManager.ControlFlags.AGENT_CONTROL_FLY;
}
m_scene.CrossAgentToNewRegion(this, m_physicsActor.Flying); public void NotInTransit()
{
m_inTransit = false;
} }
public void RestoreInCurrentScene() public void RestoreInCurrentScene()