mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-28 12:30:46 +00:00
- SW: Properly scale controller input.
This commit is contained in:
parent
3fc96e8840
commit
c5648be2bd
1 changed files with 10 additions and 8 deletions
|
@ -220,8 +220,7 @@ static void processMovement(PLAYERp const pp, ControlInfo* const hidInput, bool
|
||||||
|
|
||||||
if (strafeKey)
|
if (strafeKey)
|
||||||
{
|
{
|
||||||
svel -= xs_CRoundToInt(hidInput->mousex * 4.);
|
svel -= xs_CRoundToInt((hidInput->mousex * 4.) + (scaleAdjust * (hidInput->dyaw * keymove)));
|
||||||
svel -= hidInput->dyaw * keymove;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -237,15 +236,18 @@ static void processMovement(PLAYERp const pp, ControlInfo* const hidInput, bool
|
||||||
q16horz = -q16horz;
|
q16horz = -q16horz;
|
||||||
|
|
||||||
q16horz -= FloatToFixed(scaleAdjust * hidInput->dpitch);
|
q16horz -= FloatToFixed(scaleAdjust * hidInput->dpitch);
|
||||||
svel -= hidInput->dx * keymove;
|
svel -= xs_CRoundToInt(scaleAdjust * (hidInput->dx * keymove));
|
||||||
fvel -= hidInput->dz * keymove;
|
fvel -= xs_CRoundToInt(scaleAdjust * (hidInput->dz * keymove));
|
||||||
|
|
||||||
if (strafeKey)
|
if (strafeKey)
|
||||||
{
|
{
|
||||||
if (buttonMap.ButtonDown(gamefunc_Turn_Left))
|
if (abs(svel) < keymove)
|
||||||
svel += keymove;
|
{
|
||||||
if (buttonMap.ButtonDown(gamefunc_Turn_Right))
|
if (buttonMap.ButtonDown(gamefunc_Turn_Left))
|
||||||
svel -= keymove;
|
svel += keymove;
|
||||||
|
if (buttonMap.ButtonDown(gamefunc_Turn_Right))
|
||||||
|
svel -= keymove;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue