Rename HandleMoveToPositionUpdate() to HandleMoveToTargetUpdate() for consistency. Improve method doc.
parent
0299cb060e
commit
a2f5b4ac9a
|
@ -1485,7 +1485,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
}
|
||||
|
||||
// If the user has pressed a key then we want to cancel any move to target.
|
||||
if (HandleMoveToPositionUpdate(
|
||||
if (HandleMoveToTargetUpdate(
|
||||
ref agent_control_v3, bodyRotation, DCFlagKeyPressed, bAllowUpdateMoveToPosition))
|
||||
update_movementflag = true;
|
||||
}
|
||||
|
@ -1539,20 +1539,20 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Process move to update for an avatar.
|
||||
/// Calculate an update to move the presence to the set target.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This doesn't actually perform the movement. Instead, it adds its vector to agent_control_v3
|
||||
/// This doesn't actually perform the movement. Instead, it adds its vector to agent_control_v3.
|
||||
/// </remarks>
|
||||
/// <param value="agent_control_v3">Cumulative agent movement that this method will update.</param>
|
||||
/// <param value="bodyRotation">New body rotation of the avatar.</param>
|
||||
/// <param value="reset">If true, clear the move to position</param>
|
||||
/// <param value="allowUpdate">If true, allow the update in principle.</param>
|
||||
/// <returns>True if movement has been updated in some way. False otherwise.</returns>
|
||||
public bool HandleMoveToPositionUpdate(
|
||||
public bool HandleMoveToTargetUpdate(
|
||||
ref Vector3 agent_control_v3, Quaternion bodyRotation, bool reset, bool allowUpdate)
|
||||
{
|
||||
// m_log.DebugFormat("[SCENE PRESENCE]: Called DoMoveToPositionUpdate() for {0}", Name);
|
||||
// m_log.DebugFormat("[SCENE PRESENCE]: Called HandleMoveToTargetUpdate() for {0}", Name);
|
||||
|
||||
bool updated = false;
|
||||
|
||||
|
@ -1711,7 +1711,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
MoveToPositionTarget = pos;
|
||||
|
||||
Vector3 agent_control_v3 = new Vector3();
|
||||
HandleMoveToPositionUpdate(ref agent_control_v3, Rotation, false, true);
|
||||
HandleMoveToTargetUpdate(ref agent_control_v3, Rotation, false, true);
|
||||
AddNewMovement(agent_control_v3, Rotation);
|
||||
}
|
||||
|
||||
|
|
|
@ -86,7 +86,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC
|
|||
else
|
||||
{
|
||||
Vector3 agent_control_v3 = new Vector3();
|
||||
presence.HandleMoveToPositionUpdate(ref agent_control_v3, presence.Rotation, false, true);
|
||||
presence.HandleMoveToTargetUpdate(ref agent_control_v3, presence.Rotation, false, true);
|
||||
presence.AddNewMovement(agent_control_v3, presence.Rotation);
|
||||
}
|
||||
//
|
||||
|
|
Loading…
Reference in New Issue