Rename HandleMoveToPositionUpdate() to HandleMoveToTargetUpdate() for consistency. Improve method doc.

bulletsim
Justin Clark-Casey (justincc) 2011-08-04 00:10:53 +01:00
parent 0299cb060e
commit a2f5b4ac9a
2 changed files with 7 additions and 7 deletions

View File

@ -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 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)) ref agent_control_v3, bodyRotation, DCFlagKeyPressed, bAllowUpdateMoveToPosition))
update_movementflag = true; update_movementflag = true;
} }
@ -1539,20 +1539,20 @@ namespace OpenSim.Region.Framework.Scenes
} }
/// <summary> /// <summary>
/// Process move to update for an avatar. /// Calculate an update to move the presence to the set target.
/// </summary> /// </summary>
/// <remarks> /// <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> /// </remarks>
/// <param value="agent_control_v3">Cumulative agent movement that this method will update.</param> /// <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="bodyRotation">New body rotation of the avatar.</param>
/// <param value="reset">If true, clear the move to position</param> /// <param value="reset">If true, clear the move to position</param>
/// <param value="allowUpdate">If true, allow the update in principle.</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> /// <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) 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; bool updated = false;
@ -1711,7 +1711,7 @@ namespace OpenSim.Region.Framework.Scenes
MoveToPositionTarget = pos; MoveToPositionTarget = pos;
Vector3 agent_control_v3 = new Vector3(); 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); AddNewMovement(agent_control_v3, Rotation);
} }

View File

@ -86,7 +86,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC
else else
{ {
Vector3 agent_control_v3 = new Vector3(); 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); presence.AddNewMovement(agent_control_v3, presence.Rotation);
} }
// //