- 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.
This commit is contained in:
Mitchell Richters 2020-09-17 17:06:19 +10:00
parent d2501007f2
commit f7957fc237

View file

@ -1306,7 +1306,6 @@ int ActionScan(PLAYER *pPlayer, int *a2, int *a3)
enum enum
{ {
HORIZ_SPEED = 14,
PLAYER_HORIZ_MIN = -79, PLAYER_HORIZ_MIN = -79,
PLAYER_HORIZ_MAX = 219 PLAYER_HORIZ_MAX = 219
}; };
@ -1378,11 +1377,11 @@ void sethorizon(PLAYER *pPlayer, fixed_t const q16horz, double const scaleAdjust
// adjust q16horiz negative // adjust q16horiz negative
if (pInput->actions & SB_AIM_DOWN) if (pInput->actions & SB_AIM_DOWN)
horizAngle -= scaleAdjust * (HORIZ_SPEED >> 1); horizAngle -= scaleAdjust * (210. / GameTicRate);
// adjust q16horiz positive // adjust q16horiz positive
if (pInput->actions & SB_AIM_UP) if (pInput->actions & SB_AIM_UP)
horizAngle += scaleAdjust * (HORIZ_SPEED >> 1); horizAngle += scaleAdjust * (210. / GameTicRate);
} }
// this is the unlocked type // this is the unlocked type
@ -1392,11 +1391,11 @@ void sethorizon(PLAYER *pPlayer, fixed_t const q16horz, double const scaleAdjust
// adjust q16horiz negative // adjust q16horiz negative
if (pInput->actions & SB_LOOK_DOWN) if (pInput->actions & SB_LOOK_DOWN)
horizAngle -= scaleAdjust * HORIZ_SPEED; horizAngle -= scaleAdjust * (420. / GameTicRate);
// adjust q16horiz positive // adjust q16horiz positive
if (pInput->actions & SB_LOOK_UP) if (pInput->actions & SB_LOOK_UP)
horizAngle += scaleAdjust * HORIZ_SPEED; horizAngle += scaleAdjust * (420. / GameTicRate);
} }
if (pInput->actions & SB_CENTERVIEW) if (pInput->actions & SB_CENTERVIEW)