- fix a few places where Q16.16 values were downscaled, only to be scaled back up again.

This commit is contained in:
Mitchell Richters 2020-09-22 15:51:48 +10:00
parent 31bb9e4d8d
commit 46810ec490
3 changed files with 4 additions and 4 deletions

View File

@ -1586,7 +1586,7 @@ void ProcessInput(PLAYER *pPlayer)
if (klabs(pPlayer->q16slopehoriz) < 4) if (klabs(pPlayer->q16slopehoriz) < 4)
pPlayer->q16slopehoriz = 0; pPlayer->q16slopehoriz = 0;
} }
pPlayer->slope = -(FixedToInt(pPlayer->q16horiz) - 100)<<7; pPlayer->slope = -(pPlayer->q16horiz - IntToFixed(100)) >> 9;
if (pInput->actions & SB_INVPREV) if (pInput->actions & SB_INVPREV)
{ {
pInput->actions&= ~SB_INVPREV; pInput->actions&= ~SB_INVPREV;

View File

@ -263,7 +263,7 @@ static void fakeProcessInput(PLAYER *pPlayer, InputPacket *pInput)
if (klabs(predict.at28) < 4) if (klabs(predict.at28) < 4)
predict.at28 = 0; predict.at28 = 0;
} }
predict.at2c = (-FixedToInt(predict.at24))<<7; predict.at2c = -(predict.at24 - IntToFixed(100)) >> 9;
} }
void fakePlayerProcess(PLAYER *pPlayer, InputPacket *pInput) void fakePlayerProcess(PLAYER *pPlayer, InputPacket *pInput)

View File

@ -739,7 +739,7 @@ loc_flag:
// loc_27266: // loc_27266:
case kWeaponSword: case kWeaponSword:
{ {
nHeight += (100 - FixedToInt(PlayerList[nLocalPlayer].q16horiz)) << 6; nHeight += (IntToFixed(100) - PlayerList[nLocalPlayer].q16horiz) >> 10;
theZ += nHeight; theZ += nHeight;
@ -844,7 +844,7 @@ loc_flag:
} }
case kWeaponPistol: case kWeaponPistol:
{ {
int var_50 = (FixedToInt(PlayerList[nLocalPlayer].q16horiz) - 100) << 2; int var_50 = (PlayerList[nLocalPlayer].q16horiz - IntToFixed(100)) >> 14;
nHeight -= var_50; nHeight -= var_50;
if (sPlayerInput[nPlayer].nTarget >= 0 && cl_autoaim) if (sPlayerInput[nPlayer].nTarget >= 0 && cl_autoaim)