From 9526a96b4fd668c8b6d355155a8682868ae56abb Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Tue, 13 Jun 2017 13:22:01 +0100 Subject: some cleanup --- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) (limited to 'OpenSim/Region/Framework/Scenes/ScenePresence.cs') diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 2416b87..7e3adb9 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -2280,18 +2280,13 @@ namespace OpenSim.Region.Framework.Scenes m_lastChildAgentUpdateDrawDistance = DrawDistance; m_lastChildAgentUpdatePosition = AbsolutePosition; m_childUpdatesBusy = false; // allow them - - } m_log.DebugFormat("[CompleteMovement] openChildAgents: {0}ms", Util.EnvironmentTickCountSubtract(ts)); - - // send the rest of the world if (m_teleportFlags > 0 && !IsNPC || m_currentParcelHide) SendInitialDataToMe(); - // priority uses avatar position only // m_reprioritizationLastPosition = AbsolutePosition; @@ -2958,31 +2953,32 @@ namespace OpenSim.Region.Framework.Scenes Dir_ControlFlags.DIR_CONTROL_FLAG_DOWN)); MovementFlag &= noMovFlagsMask; - AgentControlFlags &= noMovFlagsMask; + uint tmpAgentControlFlags = (uint)m_AgentControlFlags; + tmpAgentControlFlags &= noMovFlagsMask; if (LocalVectorToTarget3D.X < 0) //MoveBack { MovementFlag |= (uint)Dir_ControlFlags.DIR_CONTROL_FLAG_BACK; - AgentControlFlags |= (uint)Dir_ControlFlags.DIR_CONTROL_FLAG_BACK; + tmpAgentControlFlags |= (uint)Dir_ControlFlags.DIR_CONTROL_FLAG_BACK; updated = true; } else if (LocalVectorToTarget3D.X > 0) //Move Forward { MovementFlag |= (uint)Dir_ControlFlags.DIR_CONTROL_FLAG_FORWARD; - AgentControlFlags |= (uint)Dir_ControlFlags.DIR_CONTROL_FLAG_FORWARD; + tmpAgentControlFlags |= (uint)Dir_ControlFlags.DIR_CONTROL_FLAG_FORWARD; updated = true; } if (LocalVectorToTarget3D.Y > 0) //MoveLeft { MovementFlag |= (uint)Dir_ControlFlags.DIR_CONTROL_FLAG_LEFT; - AgentControlFlags |= (uint)Dir_ControlFlags.DIR_CONTROL_FLAG_LEFT; + tmpAgentControlFlags |= (uint)Dir_ControlFlags.DIR_CONTROL_FLAG_LEFT; updated = true; } else if (LocalVectorToTarget3D.Y < 0) //MoveRight { MovementFlag |= (uint)Dir_ControlFlags.DIR_CONTROL_FLAG_RIGHT; - AgentControlFlags |= (uint)Dir_ControlFlags.DIR_CONTROL_FLAG_RIGHT; + tmpAgentControlFlags |= (uint)Dir_ControlFlags.DIR_CONTROL_FLAG_RIGHT; updated = true; } @@ -3006,6 +3002,7 @@ namespace OpenSim.Region.Framework.Scenes // "[SCENE PRESENCE]: HandleMoveToTargetUpdate adding {0} to move vector {1} for {2}", // LocalVectorToTarget3D, agent_control_v3, Name); + m_AgentControlFlags = (AgentManager.ControlFlags) tmpAgentControlFlags; agent_control_v3 += LocalVectorToTarget3D; } catch (Exception e) -- cgit v1.1