- SW: Get synchronised input going in a testable way. This is not a complete re-factor, just enough to get it going.

* Remove bool `PedanticMode`.
* Transition appropriate lines to `cl_syncinput`.
* Remove inlines added purely only to maintain DOS demo compatibility.
* Fix a few pedantic Q16.16 >> Int >> Q16.16 conversions.
This commit is contained in:
Mitchell Richters 2020-09-01 23:08:07 +10:00
parent 1354d52c05
commit 17da849add
5 changed files with 31 additions and 56 deletions

View file

@ -792,7 +792,7 @@ analyzesprites(int viewx, int viewy, int viewz, SWBOOL mirror)
//SET(tsp->cstat, CSTAT_SPRITE_INVISIBLE); //SET(tsp->cstat, CSTAT_SPRITE_INVISIBLE);
} }
} }
else if (!PedanticMode) // Otherwise just interpolate the player sprite else // Otherwise just interpolate the player sprite
{ {
PLAYERp pp = tu->PlayerP; PLAYERp pp = tu->PlayerP;
tsp->x -= mulscale16(pp->posx - pp->oposx, 65536-smoothratio); tsp->x -= mulscale16(pp->posx - pp->oposx, 65536-smoothratio);
@ -1678,7 +1678,7 @@ drawscreen(PLAYERp pp, double smoothratio)
tz = camerapp->oposz + xs_CRoundToInt(fmulscale16(camerapp->posz - camerapp->oposz, smoothratio)); tz = camerapp->oposz + xs_CRoundToInt(fmulscale16(camerapp->posz - camerapp->oposz, smoothratio));
// TODO: It'd be better to check pp->input.q16angvel instead, problem is that // TODO: It'd be better to check pp->input.q16angvel instead, problem is that
// it's been repurposed for the q16ang diff while tying input to framerate // it's been repurposed for the q16ang diff while tying input to framerate
if (PedanticMode || (pp != Player+myconnectindex) || if (cl_syncinput || (pp != Player+myconnectindex) ||
(TEST(pp->Flags, PF_DEAD) && (loc.q16avel == 0))) (TEST(pp->Flags, PF_DEAD) && (loc.q16avel == 0)))
{ {
tq16ang = camerapp->oq16ang + xs_CRoundToInt(fmulscale16(NORM_Q16ANGLE(camerapp->q16ang + IntToFixed(1024) - camerapp->oq16ang) - IntToFixed(1024), smoothratio)); tq16ang = camerapp->oq16ang + xs_CRoundToInt(fmulscale16(NORM_Q16ANGLE(camerapp->q16ang + IntToFixed(1024) - camerapp->oq16ang) - IntToFixed(1024), smoothratio));
@ -1739,7 +1739,7 @@ drawscreen(PLAYERp pp, double smoothratio)
if (TEST_BOOL1(pp->remote_sprite)) if (TEST_BOOL1(pp->remote_sprite))
tq16ang = IntToFixed(pp->remote_sprite->ang); tq16ang = IntToFixed(pp->remote_sprite->ang);
else else
tq16ang = GetQ16AngleFromVect(pp->sop_remote->xmid - tx, pp->sop_remote->ymid - ty); tq16ang = gethiq16angle(pp->sop_remote->xmid - tx, pp->sop_remote->ymid - ty);
} }
if (TEST(pp->Flags, PF_VIEW_FROM_OUTSIDE)) if (TEST(pp->Flags, PF_VIEW_FROM_OUTSIDE))
@ -1759,8 +1759,7 @@ drawscreen(PLAYERp pp, double smoothratio)
if (!TEST(pp->Flags, PF_VIEW_FROM_CAMERA|PF_VIEW_FROM_OUTSIDE)) if (!TEST(pp->Flags, PF_VIEW_FROM_CAMERA|PF_VIEW_FROM_OUTSIDE))
{ {
tz += bob_amt; tz += bob_amt;
tz += PedanticMode ? camerapp->bob_z : tz += pp->obob_z + xs_CRoundToInt(fmulscale16(pp->bob_z - pp->obob_z, smoothratio));
pp->obob_z + xs_CRoundToInt(fmulscale16(pp->bob_z - pp->obob_z, smoothratio));
// recoil only when not in camera // recoil only when not in camera
tq16horiz = tq16horiz + IntToFixed(pp->recoil_horizoff); tq16horiz = tq16horiz + IntToFixed(pp->recoil_horizoff);

View file

@ -105,8 +105,6 @@ SWBOOL SavegameLoaded = false;
SWBOOL FinishedLevel = false; SWBOOL FinishedLevel = false;
short screenpeek = 0; short screenpeek = 0;
SWBOOL PedanticMode;
SWBOOL LocationInfo = 0; SWBOOL LocationInfo = 0;
void drawoverheadmap(int cposx, int cposy, int czoom, short cang); void drawoverheadmap(int cposx, int cposy, int czoom, short cang);
SWBOOL PreCaching = TRUE; SWBOOL PreCaching = TRUE;
@ -308,8 +306,6 @@ void InitLevelGlobals(void)
sumowasseen = false; sumowasseen = false;
zillawasseen = false; zillawasseen = false;
memset(BossSpriteNum,-1,sizeof(BossSpriteNum)); memset(BossSpriteNum,-1,sizeof(BossSpriteNum));
PedanticMode = false;
} }
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
@ -751,7 +747,7 @@ void GameTicker(void)
gameupdatetime.Unclock(); gameupdatetime.Unclock();
// Get input again to update q16ang/q16horiz. // Get input again to update q16ang/q16horiz.
if (!PedanticMode) if (!cl_syncinput)
getinput(&loc, TRUE); getinput(&loc, TRUE);
smoothratio = I_GetTimeFrac() * MaxSmoothRatio; smoothratio = I_GetTimeFrac() * MaxSmoothRatio;

View file

@ -123,8 +123,6 @@ inline int RANDOM(void)
#include "pragmas.h" #include "pragmas.h"
extern SWBOOL PedanticMode;
// //
// Map directions/degrees // Map directions/degrees
// //
@ -262,29 +260,12 @@ inline int32_t FIXED(int32_t msw, int32_t lsw)
#define ANGLE_2_PLAYER(pp,x,y) (NORM_ANGLE(getangle(pp->posx-(x), pp->posy-(y)))) #define ANGLE_2_PLAYER(pp,x,y) (NORM_ANGLE(getangle(pp->posx-(x), pp->posy-(y))))
#define NORM_Q16ANGLE(ang) ((ang) & 0x7FFFFFF) #define NORM_Q16ANGLE(ang) ((ang) & 0x7FFFFFF)
static fixed_t FORCE_INLINE GetQ16AngleFromVect(int32_t xvect, int32_t yvect)
{
return (PedanticMode ? getq16angle : gethiq16angle)(xvect, yvect);
}
static fixed_t FORCE_INLINE PedanticQ16AngleFloor(fixed_t ang)
{
return PedanticMode ? xs_FloorToInt(ang) : ang;
}
int StdRandomRange(int range); int StdRandomRange(int range);
#define STD_RANDOM_P2(pwr_of_2) (MOD_P2(rand(),(pwr_of_2))) #define STD_RANDOM_P2(pwr_of_2) (MOD_P2(rand(),(pwr_of_2)))
#define STD_RANDOM_RANGE(range) (StdRandomRange(range)) #define STD_RANDOM_RANGE(range) (StdRandomRange(range))
#define STD_RANDOM() (rand()) #define STD_RANDOM() (rand())
#if 0
// TODO: PedanticMode
#define RANDOM_NEG(x,y) (PedanticMode \
? ((RANDOM_P2(((x)<<(y))<<1) - (x))<<(y)) \
: (RANDOM_P2(((x)<<(y))<<1) - ((x) <<(y))))
#else
#define RANDOM_NEG(x,y) ((RANDOM_P2(((x)<<(y))<<1) - (x))<<(y)) #define RANDOM_NEG(x,y) ((RANDOM_P2(((x)<<(y))<<1) - (x))<<(y))
#endif
#define MOVEx(vel,ang) (((int)(vel) * (int)sintable[NORM_ANGLE((ang) + 512)]) >> 14) #define MOVEx(vel,ang) (((int)(vel) * (int)sintable[NORM_ANGLE((ang) + 512)]) >> 14)
#define MOVEy(vel,ang) (((int)(vel) * (int)sintable[NORM_ANGLE((ang))]) >> 14) #define MOVEy(vel,ang) (((int)(vel) * (int)sintable[NORM_ANGLE((ang))]) >> 14)

View file

@ -196,7 +196,7 @@ getinput(InputPacket *loc, SWBOOL tied)
if (buttonMap.ButtonDown(gamefunc_Turn_Left) || (buttonMap.ButtonDown(gamefunc_Strafe_Left) && pp->sop)) if (buttonMap.ButtonDown(gamefunc_Turn_Left) || (buttonMap.ButtonDown(gamefunc_Strafe_Left) && pp->sop))
{ {
turnheldtime += synctics; turnheldtime += synctics;
if (PedanticMode) if (cl_syncinput)
{ {
if (turnheldtime >= TURBOTURNTIME) if (turnheldtime >= TURBOTURNTIME)
q16angvel -= IntToFixed(turnamount); q16angvel -= IntToFixed(turnamount);
@ -209,7 +209,7 @@ getinput(InputPacket *loc, SWBOOL tied)
else if (buttonMap.ButtonDown(gamefunc_Turn_Right) || (buttonMap.ButtonDown(gamefunc_Strafe_Right) && pp->sop)) else if (buttonMap.ButtonDown(gamefunc_Turn_Right) || (buttonMap.ButtonDown(gamefunc_Strafe_Right) && pp->sop))
{ {
turnheldtime += synctics; turnheldtime += synctics;
if (PedanticMode) if (cl_syncinput)
{ {
if (turnheldtime >= TURBOTURNTIME) if (turnheldtime >= TURBOTURNTIME)
q16angvel += IntToFixed(turnamount); q16angvel += IntToFixed(turnamount);
@ -243,10 +243,10 @@ getinput(InputPacket *loc, SWBOOL tied)
q16horz = clamp(q16horz, -IntToFixed(MAXHORIZVEL), IntToFixed(MAXHORIZVEL)); q16horz = clamp(q16horz, -IntToFixed(MAXHORIZVEL), IntToFixed(MAXHORIZVEL));
void DoPlayerTeleportPause(PLAYERp pp); void DoPlayerTeleportPause(PLAYERp pp);
if (PedanticMode) if (cl_syncinput)
{ {
q16angvel = xs_FloorToInt(q16angvel); q16angvel = q16angvel;
q16horz = xs_FloorToInt(q16horz); q16horz = q16horz;
} }
else else
{ {

View file

@ -1549,7 +1549,7 @@ DoPlayerTurn(PLAYERp pp, fixed_t *pq16ang, fixed_t q16angvel)
{ {
#define TURN_SHIFT 2 #define TURN_SHIFT 2
if (!PedanticMode && (pq16ang == &pp->q16ang)) if (!cl_syncinput && (pq16ang == &pp->q16ang))
{ {
SET(pp->Flags2, PF2_INPUT_CAN_TURN); SET(pp->Flags2, PF2_INPUT_CAN_TURN);
pp->q16ang = pp->input.q16ang; pp->q16ang = pp->input.q16ang;
@ -1579,8 +1579,8 @@ DoPlayerTurn(PLAYERp pp, fixed_t *pq16ang, fixed_t q16angvel)
// make the first turn in the clockwise direction // make the first turn in the clockwise direction
// the rest will follow // the rest will follow
delta_ang = GetDeltaAngle(pp->turn180_target, FixedToInt(*pq16ang)); delta_ang = GetDeltaAngle(pp->turn180_target, FixedToInt(*pq16ang));
if (PedanticMode) if (cl_syncinput)
*pq16ang = IntToFixed(NORM_ANGLE(FixedToInt(*pq16ang) + (labs(delta_ang) >> TURN_SHIFT))); *pq16ang = NORM_Q16ANGLE(*pq16ang + ((labs(delta_ang) >> TURN_SHIFT) << FRACBITS));
else else
// Add at least 1 unit to ensure the turn direction is clockwise // Add at least 1 unit to ensure the turn direction is clockwise
*pq16ang = NORM_Q16ANGLE(*pq16ang + max(FRACUNIT, FloatToFixed(scaleAdjustmentToInterval(labs(delta_ang) >> TURN_SHIFT)))); *pq16ang = NORM_Q16ANGLE(*pq16ang + max(FRACUNIT, FloatToFixed(scaleAdjustmentToInterval(labs(delta_ang) >> TURN_SHIFT))));
@ -1599,8 +1599,8 @@ DoPlayerTurn(PLAYERp pp, fixed_t *pq16ang, fixed_t q16angvel)
short delta_ang; short delta_ang;
delta_ang = GetDeltaAngle(pp->turn180_target, FixedToInt(*pq16ang)); delta_ang = GetDeltaAngle(pp->turn180_target, FixedToInt(*pq16ang));
if (PedanticMode) if (cl_syncinput)
*pq16ang = IntToFixed(NORM_ANGLE(FixedToInt(*pq16ang) + (delta_ang >> TURN_SHIFT))); *pq16ang = IntToFixed(NORM_ANGLE(FixedToInt(*pq16ang) + (delta_ang >> TURN_SHIFT)));
else else
*pq16ang = NORM_Q16ANGLE(*pq16ang + FloatToFixed(scaleAdjustmentToInterval(delta_ang >> TURN_SHIFT))); *pq16ang = NORM_Q16ANGLE(*pq16ang + FloatToFixed(scaleAdjustmentToInterval(delta_ang >> TURN_SHIFT)));
@ -1634,7 +1634,7 @@ DoPlayerTurn(PLAYERp pp, fixed_t *pq16ang, fixed_t q16angvel)
q16angvel += q16angvel / 4; q16angvel += q16angvel / 4;
*pq16ang += (q16angvel * synctics) / 32; *pq16ang += (q16angvel * synctics) / 32;
*pq16ang = PedanticQ16AngleFloor(NORM_Q16ANGLE(*pq16ang)); *pq16ang = NORM_Q16ANGLE(*pq16ang);
// update players sprite angle // update players sprite angle
// NOTE: It's also updated in UpdatePlayerSprite, but needs to be // NOTE: It's also updated in UpdatePlayerSprite, but needs to be
@ -1837,8 +1837,7 @@ PlayerAutoLook(PLAYERp pp)
if (!TEST(pp->Flags, PF_FLYING|PF_SWIMMING|PF_DIVING|PF_CLIMBING|PF_JUMPING|PF_FALLING)) if (!TEST(pp->Flags, PF_FLYING|PF_SWIMMING|PF_DIVING|PF_CLIMBING|PF_JUMPING|PF_FALLING))
{ {
if ((PedanticMode || !TEST(pp->Flags, PF_MOUSE_AIMING_ON)) if (!TEST(pp->Flags, PF_MOUSE_AIMING_ON) && TEST(sector[pp->cursectnum].floorstat, FLOOR_STAT_SLOPE)) // If the floor is sloped
&& TEST(sector[pp->cursectnum].floorstat, FLOOR_STAT_SLOPE)) // If the floor is sloped
{ {
// Get a point, 512 units ahead of player's position // Get a point, 512 units ahead of player's position
x = pp->posx + (sintable[(FixedToInt(pp->q16ang) + 512) & 2047] >> 5); x = pp->posx + (sintable[(FixedToInt(pp->q16ang) + 512) & 2047] >> 5);
@ -1861,7 +1860,7 @@ PlayerAutoLook(PLAYERp pp)
if ((pp->cursectnum == tempsect) || if ((pp->cursectnum == tempsect) ||
(klabs(getflorzofslope(tempsect, x, y) - k) <= (4 << 8))) (klabs(getflorzofslope(tempsect, x, y) - k) <= (4 << 8)))
{ {
if (PedanticMode) if (cl_syncinput)
pp->q16horizoff += (j - k) * 160; pp->q16horizoff += (j - k) * 160;
else else
pp->q16horizoff += FloatToFixed(scaleAdjustmentToInterval(mulscale16((j - k), 160))); pp->q16horizoff += FloatToFixed(scaleAdjustmentToInterval(mulscale16((j - k), 160)));
@ -1875,7 +1874,7 @@ PlayerAutoLook(PLAYERp pp)
// tilt when climbing but you can't even really tell it // tilt when climbing but you can't even really tell it
if (pp->q16horizoff < IntToFixed(100)) if (pp->q16horizoff < IntToFixed(100))
{ {
if (PedanticMode) if (cl_syncinput)
pp->q16horizoff += IntToFixed((((100 - FixedToInt(pp->q16horizoff)) >> 3) + 1)); pp->q16horizoff += IntToFixed((((100 - FixedToInt(pp->q16horizoff)) >> 3) + 1));
else else
pp->q16horizoff += FloatToFixed(scaleAdjustmentToInterval(FixedToFloat(((IntToFixed(100) - pp->q16horizoff) >> 3) + FRACUNIT))); pp->q16horizoff += FloatToFixed(scaleAdjustmentToInterval(FixedToFloat(((IntToFixed(100) - pp->q16horizoff) >> 3) + FRACUNIT)));
@ -1887,7 +1886,7 @@ PlayerAutoLook(PLAYERp pp)
// you're not on a slope // you're not on a slope
if (pp->q16horizoff > 0) if (pp->q16horizoff > 0)
{ {
if (PedanticMode) if (cl_syncinput)
pp->q16horizoff -= IntToFixed(((FixedToInt(pp->q16horizoff) >> 3) + 1)); pp->q16horizoff -= IntToFixed(((FixedToInt(pp->q16horizoff) >> 3) + 1));
else else
{ {
@ -1897,7 +1896,7 @@ PlayerAutoLook(PLAYERp pp)
} }
if (pp->q16horizoff < 0) if (pp->q16horizoff < 0)
{ {
if (PedanticMode) if (cl_syncinput)
pp->q16horizoff += IntToFixed((((FixedToInt(-pp->q16horizoff)) >> 3) + 1)); pp->q16horizoff += IntToFixed((((FixedToInt(-pp->q16horizoff)) >> 3) + 1));
else else
{ {
@ -1918,7 +1917,7 @@ DoPlayerHorizon(PLAYERp pp, fixed_t *pq16horiz, fixed_t q16horz)
// //DSPRINTF(ds,"FixedToInt(pp->q16horizoff), %d", FixedToInt(pp->q16horizoff)); // //DSPRINTF(ds,"FixedToInt(pp->q16horizoff), %d", FixedToInt(pp->q16horizoff));
// MONO_PRINT(ds); // MONO_PRINT(ds);
if (!PedanticMode && (pq16horiz == &pp->q16horiz)) if (!cl_syncinput && (pq16horiz == &pp->q16horiz))
{ {
SET(pp->Flags2, PF2_INPUT_CAN_AIM); SET(pp->Flags2, PF2_INPUT_CAN_AIM);
pp->q16horiz = pp->input.q16horiz; pp->q16horiz = pp->input.q16horiz;
@ -1939,7 +1938,7 @@ DoPlayerHorizon(PLAYERp pp, fixed_t *pq16horiz, fixed_t q16horz)
if ((pp->input.actions & SB_CENTERVIEW) || pp->centering) if ((pp->input.actions & SB_CENTERVIEW) || pp->centering)
{ {
if (PedanticMode) if (cl_syncinput)
pp->q16horizbase = IntToFixed(100); pp->q16horizbase = IntToFixed(100);
else if (pp->q16horizbase > IntToFixed(100)) else if (pp->q16horizbase > IntToFixed(100))
{ {
@ -1965,7 +1964,7 @@ DoPlayerHorizon(PLAYERp pp, fixed_t *pq16horiz, fixed_t q16horz)
// adjust *pq16horiz negative // adjust *pq16horiz negative
if (pp->input.actions & SB_AIM_DOWN) if (pp->input.actions & SB_AIM_DOWN)
{ {
if (PedanticMode) if (cl_syncinput)
pp->q16horizbase -= IntToFixed((HORIZ_SPEED/2)); pp->q16horizbase -= IntToFixed((HORIZ_SPEED/2));
else else
pp->q16horizbase -= FloatToFixed(scaleAdjustmentToInterval((HORIZ_SPEED/2))); pp->q16horizbase -= FloatToFixed(scaleAdjustmentToInterval((HORIZ_SPEED/2)));
@ -1974,7 +1973,7 @@ DoPlayerHorizon(PLAYERp pp, fixed_t *pq16horiz, fixed_t q16horz)
// adjust *pq16horiz positive // adjust *pq16horiz positive
if (pp->input.actions & SB_AIM_UP) if (pp->input.actions & SB_AIM_UP)
{ {
if (PedanticMode) if (cl_syncinput)
pp->q16horizbase += IntToFixed((HORIZ_SPEED/2)); pp->q16horizbase += IntToFixed((HORIZ_SPEED/2));
else else
pp->q16horizbase += FloatToFixed(scaleAdjustmentToInterval((HORIZ_SPEED/2))); pp->q16horizbase += FloatToFixed(scaleAdjustmentToInterval((HORIZ_SPEED/2)));
@ -1991,7 +1990,7 @@ DoPlayerHorizon(PLAYERp pp, fixed_t *pq16horiz, fixed_t q16horz)
// adjust *pq16horiz negative // adjust *pq16horiz negative
if (pp->input.actions & SB_LOOK_DOWN) if (pp->input.actions & SB_LOOK_DOWN)
{ {
if (PedanticMode) if (cl_syncinput)
pp->q16horizbase -= IntToFixed(HORIZ_SPEED); pp->q16horizbase -= IntToFixed(HORIZ_SPEED);
else else
pp->q16horizbase -= FloatToFixed(scaleAdjustmentToInterval(HORIZ_SPEED)); pp->q16horizbase -= FloatToFixed(scaleAdjustmentToInterval(HORIZ_SPEED));
@ -2000,7 +1999,7 @@ DoPlayerHorizon(PLAYERp pp, fixed_t *pq16horiz, fixed_t q16horz)
// adjust *pq16horiz positive // adjust *pq16horiz positive
if (pp->input.actions & SB_LOOK_UP) if (pp->input.actions & SB_LOOK_UP)
{ {
if (PedanticMode) if (cl_syncinput)
pp->q16horizbase += IntToFixed(HORIZ_SPEED); pp->q16horizbase += IntToFixed(HORIZ_SPEED);
else else
pp->q16horizbase += FloatToFixed(scaleAdjustmentToInterval(HORIZ_SPEED)); pp->q16horizbase += FloatToFixed(scaleAdjustmentToInterval(HORIZ_SPEED));
@ -2020,7 +2019,7 @@ DoPlayerHorizon(PLAYERp pp, fixed_t *pq16horiz, fixed_t q16horz)
for (i = 1; i; i--) for (i = 1; i; i--)
{ {
// this formula does not work for *pq16horiz = 101-103 // this formula does not work for *pq16horiz = 101-103
if (PedanticMode) if (cl_syncinput)
pp->q16horizbase += IntToFixed(25) - (pp->q16horizbase >> 2); pp->q16horizbase += IntToFixed(25) - (pp->q16horizbase >> 2);
else else
pp->q16horizbase += FloatToFixed(scaleAdjustmentToInterval(FixedToFloat(IntToFixed(25) - (pp->q16horizbase >> 2)))); pp->q16horizbase += FloatToFixed(scaleAdjustmentToInterval(FixedToFloat(IntToFixed(25) - (pp->q16horizbase >> 2))));
@ -6603,10 +6602,10 @@ void DoPlayerDeathFollowKiller(PLAYERp pp)
if (FAFcansee(kp->x, kp->y, SPRITEp_TOS(kp), kp->sectnum, if (FAFcansee(kp->x, kp->y, SPRITEp_TOS(kp), kp->sectnum,
pp->posx, pp->posy, pp->posz, pp->cursectnum)) pp->posx, pp->posy, pp->posz, pp->cursectnum))
{ {
q16ang2 = GetQ16AngleFromVect(kp->x - pp->posx, kp->y - pp->posy); q16ang2 = gethiq16angle(kp->x - pp->posx, kp->y - pp->posy);
delta_q16ang = GetDeltaQ16Angle(q16ang2, pp->q16ang); delta_q16ang = GetDeltaQ16Angle(q16ang2, pp->q16ang);
pp->camq16ang = pp->q16ang = NORM_Q16ANGLE(pp->q16ang + PedanticQ16AngleFloor(delta_q16ang >> 4)); pp->camq16ang = pp->q16ang = NORM_Q16ANGLE(pp->q16ang + (delta_q16ang >> 4));
} }
} }
} }
@ -7708,7 +7707,7 @@ domovethings(void)
// Mostly done in order to force updates to oq16ang/oq16horiz. // Mostly done in order to force updates to oq16ang/oq16horiz.
// Don't do so for a dead player which may follow // Don't do so for a dead player which may follow
// the killer if present, due to angle interpolation. // the killer if present, due to angle interpolation.
if (!PedanticMode && !TEST(pp->Flags, PF_DEAD)) if (!cl_syncinput && !TEST(pp->Flags, PF_DEAD))
{ {
auto currFlags2 = pp->Flags2; auto currFlags2 = pp->Flags2;
if (prevFlags2 & currFlags2 & PF2_INPUT_CAN_TURN) if (prevFlags2 & currFlags2 & PF2_INPUT_CAN_TURN)