Navigation Menu

Skip to content

Commit

Permalink
- Use turnscale in controller pitch calculations, which is only use…
Browse files Browse the repository at this point in the history
…d in SW when on a sector object, and is original behaviour.
  • Loading branch information
mjr4077au committed Jul 23, 2022
1 parent 00e12ea commit a423b93
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions source/core/gameinput.cpp
Expand Up @@ -189,11 +189,11 @@ void processMovement(InputPacket* const currInput, InputPacket* const inputBuffe
bool const strafing = buttonMap.ButtonDown(gamefunc_Strafe) && allowstrafe;
float const mousevelscale = keymove * (1.f / 160.f);
double const hidprescale = g_gameType & GAMEFLAG_PSEXHUMED ? 5. : 1.;
double const hidspeed = getTicrateScale(running ? RUNNINGTURNBASE : NORMALTURNBASE) * BAngToDegree;
double const hidspeed = getTicrateScale(running ? RUNNINGTURNBASE : NORMALTURNBASE) * turnscale * BAngToDegree;

// process mouse and initial controller input.
if (!strafing)
currInput->avel += float(hidInput->mouseturnx + (scaleAdjust * hidInput->dyaw * hidspeed * turnscale));
currInput->avel += float(hidInput->mouseturnx + (scaleAdjust * hidInput->dyaw * hidspeed));
else
currInput->svel -= int16_t(((hidInput->mousemovex * mousevelscale) + (scaleAdjust * hidInput->dyaw * keymove)) * hidprescale);

Expand All @@ -216,7 +216,7 @@ void processMovement(InputPacket* const currInput, InputPacket* const inputBuffe
if (turnleft || turnright)
{
updateTurnHeldAmt(scaleAdjust);
float const turnamount = float(scaleAdjust * hidspeed * turnscale * (isTurboTurnTime() ? 1. : PREAMBLESCALE));
float const turnamount = float(scaleAdjust * hidspeed * (isTurboTurnTime() ? 1. : PREAMBLESCALE));

if (turnleft)
currInput->avel -= turnamount;
Expand Down

0 comments on commit a423b93

Please sign in to comment.