eliminate a reset position flag by using functionally equivalent DCFlagKeyPressed

bulletsim
Justin Clark-Casey (justincc) 2011-08-04 00:06:01 +01:00
parent 6ab01b338f
commit 0299cb060e
1 changed files with 4 additions and 3 deletions

View File

@ -1417,7 +1417,6 @@ namespace OpenSim.Region.Framework.Scenes
if (m_parentID == 0) if (m_parentID == 0)
{ {
bool bAllowUpdateMoveToPosition = false; bool bAllowUpdateMoveToPosition = false;
bool bResetMoveToPosition = false;
Vector3[] dirVectors; Vector3[] dirVectors;
@ -1436,8 +1435,8 @@ namespace OpenSim.Region.Framework.Scenes
{ {
if (((uint)flags & (uint)DCF) != 0) if (((uint)flags & (uint)DCF) != 0)
{ {
bResetMoveToPosition = true;
DCFlagKeyPressed = true; DCFlagKeyPressed = true;
try try
{ {
agent_control_v3 += dirVectors[i]; agent_control_v3 += dirVectors[i];
@ -1485,7 +1484,9 @@ namespace OpenSim.Region.Framework.Scenes
i++; i++;
} }
if (HandleMoveToPositionUpdate(ref agent_control_v3, bodyRotation, bResetMoveToPosition, bAllowUpdateMoveToPosition)) // If the user has pressed a key then we want to cancel any move to target.
if (HandleMoveToPositionUpdate(
ref agent_control_v3, bodyRotation, DCFlagKeyPressed, bAllowUpdateMoveToPosition))
update_movementflag = true; update_movementflag = true;
} }