From cfdb57ac6dfdc43b7f0ae327ba0cd601bea6b5bf Mon Sep 17 00:00:00 2001 From: hendricks266 Date: Wed, 14 Aug 2019 03:03:34 +0000 Subject: [PATCH] Make use of fix16 for controller aiming git-svn-id: https://svn.eduke32.com/eduke32@7980 1a8010ca-5511-0410-912e-c29ae57300e0 --- source/duke3d/src/player.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/duke3d/src/player.cpp b/source/duke3d/src/player.cpp index 3d4cbef9d..1558aa63d 100644 --- a/source/duke3d/src/player.cpp +++ b/source/duke3d/src/player.cpp @@ -2962,7 +2962,7 @@ void P_GetInput(int const playerNum) else { 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) @@ -2972,7 +2972,7 @@ void P_GetInput(int const playerNum) 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.fvel -= info.dz * keyMove / analogExtent;