- SW: Add resetinputhelpers() and hook up within game.

This commit is contained in:
Mitchell Richters 2020-09-07 21:15:53 +10:00
parent 77816bf3d3
commit 1cc1c21029
2 changed files with 10 additions and 0 deletions

View file

@ -7454,6 +7454,8 @@ domovethings(void)
// Reset flags used while tying input to framerate
RESET(pp->Flags2, PF2_INPUT_CAN_TURN|PF2_INPUT_CAN_AIM);
resetinputhelpers(pp);
if (pp->DoPlayerAction) pp->DoPlayerAction(pp);
UpdatePlayerSprite(pp);
@ -7791,6 +7793,13 @@ void CheckFootPrints(PLAYERp pp)
//
//---------------------------------------------------------------------------
void resetinputhelpers(PLAYERp pp)
{
pp->horizAdjust = 0;
pp->angAdjust = 0;
pp->pitchAdjust = 0;
}
void playerAddAngle(PLAYERp pp, double ang)
{
if (!cl_syncinput)

View file

@ -144,6 +144,7 @@ void PlaySOsound(short sectnum,short sound_num);
void DoSpawnTeleporterEffectPlace(SPRITEp sp);
void FindMainSector(SECTOR_OBJECTp sop);
void resetinputhelpers(PLAYERp pp);
void playerAddAngle(PLAYERp pp, double ang);
void playerSetAngle(PLAYERp pp, double ang);
void playerAddHoriz(PLAYERp pp, double horiz);