- SW: Stop keyboard fvel/svel from allowing loc.fvel/loc.svel like Duke.

* Stops overshooting keymove when playing with `cl_syncinput 0`.
* Keymove is never as high as MAXFVEL/MAXSVEL, which is used as a thrash point for controller input.
* Fixes #390.
This commit is contained in:
Mitchell Richters 2020-09-14 18:54:03 +10:00
parent 7395110ae9
commit 3fc96e8840

View file

@ -265,17 +265,22 @@ static void processMovement(PLAYERp const pp, ControlInfo* const hidInput, bool
}
}
if (buttonMap.ButtonDown(gamefunc_Strafe_Left) && !pp->sop)
svel += keymove;
if (abs(loc.svel) < keymove)
{
if (buttonMap.ButtonDown(gamefunc_Strafe_Left) && !pp->sop)
svel += keymove;
if (buttonMap.ButtonDown(gamefunc_Strafe_Right) && !pp->sop)
svel -= keymove;
if (buttonMap.ButtonDown(gamefunc_Strafe_Right) && !pp->sop)
svel -= keymove;
}
if (abs(loc.fvel) < keymove)
{
if (buttonMap.ButtonDown(gamefunc_Move_Forward))
fvel += keymove;
if (buttonMap.ButtonDown(gamefunc_Move_Forward))
fvel += keymove;
if (buttonMap.ButtonDown(gamefunc_Move_Backward))
fvel -= keymove;
if (buttonMap.ButtonDown(gamefunc_Move_Backward))
fvel -= keymove;
}
if (!cl_syncinput)
{