From f7957fc237b338fd0d464acde960c48fe8e3e95c Mon Sep 17 00:00:00 2001 From: Mitchell Richters Date: Thu, 17 Sep 2020 17:06:19 +1000 Subject: [PATCH] - Blood: Factor in game's tic-rate when aiming/looking up/down. * Doesn't matter for Blood, but will matter for SW in a unified approach. Might as well get it right here. * Appreciate the literal doubles in lieu of the enums isn't great, but this function will go into the backend in due course. --- source/blood/src/player.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/source/blood/src/player.cpp b/source/blood/src/player.cpp index 3f6878e9c..724cd1470 100644 --- a/source/blood/src/player.cpp +++ b/source/blood/src/player.cpp @@ -1306,7 +1306,6 @@ int ActionScan(PLAYER *pPlayer, int *a2, int *a3) enum { - HORIZ_SPEED = 14, PLAYER_HORIZ_MIN = -79, PLAYER_HORIZ_MAX = 219 }; @@ -1378,11 +1377,11 @@ void sethorizon(PLAYER *pPlayer, fixed_t const q16horz, double const scaleAdjust // adjust q16horiz negative if (pInput->actions & SB_AIM_DOWN) - horizAngle -= scaleAdjust * (HORIZ_SPEED >> 1); + horizAngle -= scaleAdjust * (210. / GameTicRate); // adjust q16horiz positive if (pInput->actions & SB_AIM_UP) - horizAngle += scaleAdjust * (HORIZ_SPEED >> 1); + horizAngle += scaleAdjust * (210. / GameTicRate); } // this is the unlocked type @@ -1392,11 +1391,11 @@ void sethorizon(PLAYER *pPlayer, fixed_t const q16horz, double const scaleAdjust // adjust q16horiz negative if (pInput->actions & SB_LOOK_DOWN) - horizAngle -= scaleAdjust * HORIZ_SPEED; + horizAngle -= scaleAdjust * (420. / GameTicRate); // adjust q16horiz positive if (pInput->actions & SB_LOOK_UP) - horizAngle += scaleAdjust * HORIZ_SPEED; + horizAngle += scaleAdjust * (420. / GameTicRate); } if (pInput->actions & SB_CENTERVIEW)