diff options
author | Justin Clark-Casey (justincc) | 2011-08-04 00:06:01 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2011-08-04 00:06:01 +0100 |
commit | 0299cb060eb55c6b7d068d74d2b9ccc0c607381e (patch) | |
tree | a8e55172fb5f0f937a3288dcec44598b210cc42f /OpenSim/Region/Framework | |
parent | Stop calling the SP.ResetMoveToTarget() code if a target is not actually set (diff) | |
download | opensim-SC_OLD-0299cb060eb55c6b7d068d74d2b9ccc0c607381e.zip opensim-SC_OLD-0299cb060eb55c6b7d068d74d2b9ccc0c607381e.tar.gz opensim-SC_OLD-0299cb060eb55c6b7d068d74d2b9ccc0c607381e.tar.bz2 opensim-SC_OLD-0299cb060eb55c6b7d068d74d2b9ccc0c607381e.tar.xz |
eliminate a reset position flag by using functionally equivalent DCFlagKeyPressed
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 7 |
1 files changed, 4 insertions, 3 deletions
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 | |||
1417 | if (m_parentID == 0) | 1417 | if (m_parentID == 0) |
1418 | { | 1418 | { |
1419 | bool bAllowUpdateMoveToPosition = false; | 1419 | bool bAllowUpdateMoveToPosition = false; |
1420 | bool bResetMoveToPosition = false; | ||
1421 | 1420 | ||
1422 | Vector3[] dirVectors; | 1421 | Vector3[] dirVectors; |
1423 | 1422 | ||
@@ -1436,8 +1435,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
1436 | { | 1435 | { |
1437 | if (((uint)flags & (uint)DCF) != 0) | 1436 | if (((uint)flags & (uint)DCF) != 0) |
1438 | { | 1437 | { |
1439 | bResetMoveToPosition = true; | ||
1440 | DCFlagKeyPressed = true; | 1438 | DCFlagKeyPressed = true; |
1439 | |||
1441 | try | 1440 | try |
1442 | { | 1441 | { |
1443 | agent_control_v3 += dirVectors[i]; | 1442 | agent_control_v3 += dirVectors[i]; |
@@ -1485,7 +1484,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
1485 | i++; | 1484 | i++; |
1486 | } | 1485 | } |
1487 | 1486 | ||
1488 | if (HandleMoveToPositionUpdate(ref agent_control_v3, bodyRotation, bResetMoveToPosition, bAllowUpdateMoveToPosition)) | 1487 | // If the user has pressed a key then we want to cancel any move to target. |
1488 | if (HandleMoveToPositionUpdate( | ||
1489 | ref agent_control_v3, bodyRotation, DCFlagKeyPressed, bAllowUpdateMoveToPosition)) | ||
1489 | update_movementflag = true; | 1490 | update_movementflag = true; |
1490 | } | 1491 | } |
1491 | 1492 | ||