From 0299cb060eb55c6b7d068d74d2b9ccc0c607381e Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Thu, 4 Aug 2011 00:06:01 +0100 Subject: eliminate a reset position flag by using functionally equivalent DCFlagKeyPressed --- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 71dd2eb..9f7bd9d 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -1417,7 +1417,6 @@ namespace OpenSim.Region.Framework.Scenes if (m_parentID == 0) { bool bAllowUpdateMoveToPosition = false; - bool bResetMoveToPosition = false; Vector3[] dirVectors; @@ -1436,8 +1435,8 @@ namespace OpenSim.Region.Framework.Scenes { if (((uint)flags & (uint)DCF) != 0) { - bResetMoveToPosition = true; DCFlagKeyPressed = true; + try { agent_control_v3 += dirVectors[i]; @@ -1485,7 +1484,9 @@ namespace OpenSim.Region.Framework.Scenes 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; } -- cgit v1.1