refactor: Move update_movement_flag and the final check inside the m_allowMovement if in HandleAgentUpdate() since it's logically only ever used there
parent
f9689f5cc9
commit
1c126e6e22
|
@ -1378,10 +1378,10 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool update_movementflag = false;
|
|
||||||
|
|
||||||
if (m_allowMovement && !SitGround)
|
if (m_allowMovement && !SitGround)
|
||||||
{
|
{
|
||||||
|
bool update_movementflag = false;
|
||||||
|
|
||||||
if (agentData.UseClientAgentPosition)
|
if (agentData.UseClientAgentPosition)
|
||||||
{
|
{
|
||||||
m_moveToPositionInProgress = (agentData.ClientAgentPosition - AbsolutePosition).Length() > 0.2f;
|
m_moveToPositionInProgress = (agentData.ClientAgentPosition - AbsolutePosition).Length() > 0.2f;
|
||||||
|
@ -1521,10 +1521,10 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
AddNewMovement(agent_control_v3, q);
|
AddNewMovement(agent_control_v3, q);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (update_movementflag && ((flags & AgentManager.ControlFlags.AGENT_CONTROL_SIT_ON_GROUND) == 0) && (m_parentID == 0) && !SitGround)
|
if (update_movementflag && ((flags & AgentManager.ControlFlags.AGENT_CONTROL_SIT_ON_GROUND) == 0) && (m_parentID == 0) && !SitGround)
|
||||||
Animator.UpdateMovementAnimations();
|
Animator.UpdateMovementAnimations();
|
||||||
|
}
|
||||||
|
|
||||||
m_scene.EventManager.TriggerOnClientMovement(this);
|
m_scene.EventManager.TriggerOnClientMovement(this);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue