Duke3D: Change horizSkew from fix16_t to int8_t.

- No point converting an int to fix16, only to convert it back. It's only ever an unrounded integer.
This commit is contained in:
Mitchell Richters 2020-05-10 17:09:35 +10:00 committed by Christoph Oelckers
parent c7d3753c2b
commit ae353b93fb
2 changed files with 4 additions and 4 deletions

View file

@ -3374,7 +3374,7 @@ void P_GetInput(int const playerNum)
}
if (thisPlayer.horizSkew)
pPlayer->q16horiz = fix16_sadd(pPlayer->q16horiz, fix16_from_dbl(scaleAdjustmentToInterval(fix16_to_dbl(thisPlayer.horizSkew))));
pPlayer->q16horiz = fix16_sadd(pPlayer->q16horiz, fix16_from_dbl(scaleAdjustmentToInterval(thisPlayer.horizSkew)));
pPlayer->q16horiz = fix16_clamp(pPlayer->q16horiz, F16(HORIZ_MIN), F16(HORIZ_MAX));
}
@ -5747,7 +5747,7 @@ RECHECK:
if (pPlayer->hard_landing > 0)
{
thisPlayer.horizSkew = fix16_from_int(-(pPlayer->hard_landing << 4));
thisPlayer.horizSkew = -(pPlayer->hard_landing << 4);
pPlayer->hard_landing--;
}
@ -5776,7 +5776,7 @@ RECHECK:
#ifndef EDUKE32_STANDALONE
if (!FURY && pPlayer->knee_incs > 0)
{
thisPlayer.horizSkew = F16(-48);
thisPlayer.horizSkew = -48;
thisPlayer.horizRecenter = true;
pPlayer->return_to_center = 9;

View file

@ -230,7 +230,7 @@ typedef struct
bool horizRecenter;
float horizAngleAdjust;
fix16_t horizSkew;
int8_t horizSkew;
int32_t netsynctime;
int16_t ping, filler;