Implement nudging support for strafing motion

remove-scene-viewer
Melanie 2011-11-10 22:34:54 +01:00
parent c0d280d948
commit f5abae5ac6
1 changed files with 4 additions and 2 deletions

View File

@ -1509,7 +1509,8 @@ namespace OpenSim.Region.Framework.Scenes
if ((MovementFlag & (byte)(uint)DCF) == 0) if ((MovementFlag & (byte)(uint)DCF) == 0)
{ {
if (DCF == Dir_ControlFlags.DIR_CONTROL_FLAG_FORWARD_NUDGE || DCF == Dir_ControlFlags.DIR_CONTROL_FLAG_BACKWARD_NUDGE) if (DCF == Dir_ControlFlags.DIR_CONTROL_FLAG_FORWARD_NUDGE || DCF == Dir_ControlFlags.DIR_CONTROL_FLAG_BACKWARD_NUDGE ||
DCF == Dir_ControlFlags.DIR_CONTROL_FLAG_LEFT_NUDGE || DCF == Dir_ControlFlags.DIR_CONTROL_FLAG_RIGHT_NUDGE)
{ {
MovementFlag |= (byte)nudgehack; MovementFlag |= (byte)nudgehack;
} }
@ -1522,7 +1523,8 @@ namespace OpenSim.Region.Framework.Scenes
else else
{ {
if ((MovementFlag & (byte)(uint)DCF) != 0 || if ((MovementFlag & (byte)(uint)DCF) != 0 ||
((DCF == Dir_ControlFlags.DIR_CONTROL_FLAG_FORWARD_NUDGE || DCF == Dir_ControlFlags.DIR_CONTROL_FLAG_BACKWARD_NUDGE) ((DCF == Dir_ControlFlags.DIR_CONTROL_FLAG_FORWARD_NUDGE || DCF == Dir_ControlFlags.DIR_CONTROL_FLAG_BACKWARD_NUDGE ||
DCF == Dir_ControlFlags.DIR_CONTROL_FLAG_LEFT_NUDGE || DCF == Dir_ControlFlags.DIR_CONTROL_FLAG_RIGHT_NUDGE)
&& ((MovementFlag & (byte)nudgehack) == nudgehack)) && ((MovementFlag & (byte)nudgehack) == nudgehack))
) // This or is for Nudge forward ) // This or is for Nudge forward
{ {