diff --git a/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs b/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs index d0156e17e4..9060bf21d7 100644 --- a/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs +++ b/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs @@ -1195,7 +1195,8 @@ namespace OpenSim.Region.Framework.Scenes } agent.RestoreInCurrentScene(); } - agent.IsInTransit = false; + // In any case + agent.NotInTransit(); //m_log.DebugFormat("[SCENE COMM]: 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 df6c97a521..fc883dbfc8 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -934,6 +934,12 @@ namespace OpenSim.Region.Framework.Scenes Velocity = new Vector3(0, 0, 0); AbsolutePosition = pos; AddToPhysicalScene(isFlying); + if (m_appearance != null) + { + if (m_appearance.AvatarHeight > 0) + SetHeight(m_appearance.AvatarHeight); + } + SendTerseUpdateToAllClients(); } @@ -2437,6 +2443,12 @@ namespace OpenSim.Region.Framework.Scenes /// set them to a child agent. /// protected void CrossToNewRegion() + { + InTransit(); + m_scene.CrossAgentToNewRegion(this, m_physicsActor.Flying); + } + + public void InTransit() { m_inTransit = true; @@ -2444,8 +2456,11 @@ namespace OpenSim.Region.Framework.Scenes m_AgentControlFlags |= (uint)AgentManager.ControlFlags.AGENT_CONTROL_FLY; else if ((m_AgentControlFlags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_FLY) != 0) m_AgentControlFlags &= ~(uint)AgentManager.ControlFlags.AGENT_CONTROL_FLY; + } - m_scene.CrossAgentToNewRegion(this, m_physicsActor.Flying); + public void NotInTransit() + { + m_inTransit = false; } public void RestoreInCurrentScene()