mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-10 23:02:03 +00:00
Make use of fix16 for controller aiming
git-svn-id: https://svn.eduke32.com/eduke32@7980 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
314eaa7200
commit
cfdb57ac6d
1 changed files with 2 additions and 2 deletions
|
@ -2962,7 +2962,7 @@ void P_GetInput(int const playerNum)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
input.q16avel = fix16_div(fix16_from_int(info.mousex), F16(32));
|
input.q16avel = fix16_div(fix16_from_int(info.mousex), F16(32));
|
||||||
input.q16avel += fix16_from_int(info.dyaw * (turnAmount << 1) / analogExtent);
|
input.q16avel += fix16_from_int(info.dyaw) / analogExtent * (turnAmount << 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (g_myAimMode)
|
if (g_myAimMode)
|
||||||
|
@ -2972,7 +2972,7 @@ void P_GetInput(int const playerNum)
|
||||||
|
|
||||||
if (ud.mouseflip) input.q16horz = -input.q16horz;
|
if (ud.mouseflip) input.q16horz = -input.q16horz;
|
||||||
|
|
||||||
input.q16horz -= fix16_from_int(info.dpitch * turnAmount / analogExtent);
|
input.q16horz -= fix16_from_int(info.dpitch) / analogExtent * turnAmount;
|
||||||
input.svel -= info.dx * keyMove / analogExtent;
|
input.svel -= info.dx * keyMove / analogExtent;
|
||||||
input.fvel -= info.dz * keyMove / analogExtent;
|
input.fvel -= info.dz * keyMove / analogExtent;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue