diff options
Diffstat (limited to 'OpenSim/Region')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 25 |
1 files changed, 6 insertions, 19 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 9cb9303..a34c44c 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -351,7 +351,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
351 | /// <summary> | 351 | /// <summary> |
352 | /// Record user movement inputs. | 352 | /// Record user movement inputs. |
353 | /// </summary> | 353 | /// </summary> |
354 | public byte MovementFlag { get; private set; } | 354 | public uint MovementFlag { get; private set; } |
355 | 355 | ||
356 | private bool m_updateflag; | 356 | private bool m_updateflag; |
357 | 357 | ||
@@ -1695,10 +1695,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1695 | else | 1695 | else |
1696 | dirVectors = Dir_Vectors; | 1696 | dirVectors = Dir_Vectors; |
1697 | 1697 | ||
1698 | // The fact that MovementFlag is a byte needs to be fixed | ||
1699 | // it really should be a uint | ||
1700 | // A DIR_CONTROL_FLAG occurs when the user is trying to move in a particular direction. | 1698 | // A DIR_CONTROL_FLAG occurs when the user is trying to move in a particular direction. |
1701 | uint nudgehack = 250; | ||
1702 | foreach (Dir_ControlFlags DCF in DIR_CONTROL_FLAGS) | 1699 | foreach (Dir_ControlFlags DCF in DIR_CONTROL_FLAGS) |
1703 | { | 1700 | { |
1704 | if (((uint)flags & (uint)DCF) != 0) | 1701 | if (((uint)flags & (uint)DCF) != 0) |
@@ -1715,29 +1712,19 @@ namespace OpenSim.Region.Framework.Scenes | |||
1715 | // Why did I get this? | 1712 | // Why did I get this? |
1716 | } | 1713 | } |
1717 | 1714 | ||
1718 | if ((MovementFlag & (byte)(uint)DCF) == 0) | 1715 | if ((MovementFlag & (uint)DCF) == 0) |
1719 | { | 1716 | { |
1720 | if (DCF == Dir_ControlFlags.DIR_CONTROL_FLAG_FORWARD_NUDGE || DCF == Dir_ControlFlags.DIR_CONTROL_FLAG_BACKWARD_NUDGE || | ||
1721 | DCF == Dir_ControlFlags.DIR_CONTROL_FLAG_LEFT_NUDGE || DCF == Dir_ControlFlags.DIR_CONTROL_FLAG_RIGHT_NUDGE) | ||
1722 | { | ||
1723 | MovementFlag |= (byte)nudgehack; | ||
1724 | } | ||
1725 | |||
1726 | //m_log.DebugFormat("[SCENE PRESENCE]: Updating MovementFlag for {0} with {1}", Name, DCF); | 1717 | //m_log.DebugFormat("[SCENE PRESENCE]: Updating MovementFlag for {0} with {1}", Name, DCF); |
1727 | MovementFlag += (byte)(uint)DCF; | 1718 | MovementFlag += (uint)DCF; |
1728 | update_movementflag = true; | 1719 | update_movementflag = true; |
1729 | } | 1720 | } |
1730 | } | 1721 | } |
1731 | else | 1722 | else |
1732 | { | 1723 | { |
1733 | if ((MovementFlag & (byte)(uint)DCF) != 0 || | 1724 | if ((MovementFlag & (uint)DCF) != 0) |
1734 | ((DCF == Dir_ControlFlags.DIR_CONTROL_FLAG_FORWARD_NUDGE || DCF == Dir_ControlFlags.DIR_CONTROL_FLAG_BACKWARD_NUDGE || | ||
1735 | DCF == Dir_ControlFlags.DIR_CONTROL_FLAG_LEFT_NUDGE || DCF == Dir_ControlFlags.DIR_CONTROL_FLAG_RIGHT_NUDGE) | ||
1736 | && ((MovementFlag & (byte)nudgehack) == nudgehack)) | ||
1737 | ) // This or is for Nudge forward | ||
1738 | { | 1725 | { |
1739 | //m_log.DebugFormat("[SCENE PRESENCE]: Updating MovementFlag for {0} with lack of {1}", Name, DCF); | 1726 | //m_log.DebugFormat("[SCENE PRESENCE]: Updating MovementFlag for {0} with lack of {1}", Name, DCF); |
1740 | MovementFlag -= ((byte)(uint)DCF); | 1727 | MovementFlag -= (uint)DCF; |
1741 | update_movementflag = true; | 1728 | update_movementflag = true; |
1742 | 1729 | ||
1743 | /* | 1730 | /* |