- Rename PlayerAngle prototypes in preparation for replacement work.

This commit is contained in:
Mitchell Richters 2022-11-25 16:48:04 +11:00 committed by Christoph Oelckers
parent 9b6f01dff0
commit d75ac9e445
10 changed files with 10 additions and 10 deletions

View file

@ -222,7 +222,7 @@ void PlayerHorizon::applyPitch(float const horz, ESyncBits* actions, double cons
//
//---------------------------------------------------------------------------
void PlayerAngle::applyinput(float const avel, ESyncBits* actions, double const scaleAdjust)
void PlayerAngle::applyYaw(float const avel, ESyncBits* actions, double const scaleAdjust)
{
// Process angle return to zeros.
scaletozero(ZzROTSCRNANG, YAW_LOOKRETURN, scaleAdjust);

View file

@ -105,7 +105,7 @@ struct PlayerAngle
friend FSerializer& Serialize(FSerializer& arc, const char* keyname, PlayerAngle& w, PlayerAngle* def);
// Prototypes for functions in gameinput.cpp.
void applyinput(float const avel, ESyncBits* actions, double const scaleAdjust = 1);
void applyYaw(float const avel, ESyncBits* actions, double const scaleAdjust = 1);
// Interpolation helpers.
void backupYaw()

View file

@ -62,7 +62,7 @@ void GameInterface::GetInput(ControlInfo* const hidInput, double const scaleAdju
// Perform unsynchronised angle/horizon if not dead.
if (pPlayer->actor->xspr.health != 0)
{
pPlayer->angle.applyinput(input.avel, &pPlayer->input.actions, scaleAdjust);
pPlayer->angle.applyYaw(input.avel, &pPlayer->input.actions, scaleAdjust);
pPlayer->horizon.applyPitch(input.horz, &pPlayer->input.actions, scaleAdjust);
doslopetilting(pPlayer, scaleAdjust);
}

View file

@ -1597,7 +1597,7 @@ void ProcessInput(PLAYER* pPlayer)
if (SyncInput())
{
pPlayer->angle.applyinput(pInput->avel, &pInput->actions);
pPlayer->angle.applyYaw(pInput->avel, &pInput->actions);
}
// unconditionally update the player's sprite angle

View file

@ -836,7 +836,7 @@ void GameInterface::GetInput(ControlInfo* const hidInput, double const scaleAdju
{
// Do these in the same order as the old code.
doslopetilting(p, scaleAdjust);
p->angle.applyinput(p->adjustavel(input.avel), &p->sync.actions, scaleAdjust);
p->angle.applyYaw(p->adjustavel(input.avel), &p->sync.actions, scaleAdjust);
p->apply_seasick(scaleAdjust);
p->horizon.applyPitch(input.horz, &p->sync.actions, scaleAdjust);
}

View file

@ -2904,7 +2904,7 @@ void processinput_d(int snum)
// may still be needed later for demo recording
sb_avel = p->adjustavel(sb_avel);
p->angle.applyinput(sb_avel, &actions);
p->angle.applyYaw(sb_avel, &actions);
}
if (p->spritebridge == 0 && pact->insector())

View file

@ -3559,7 +3559,7 @@ void processinput_r(int snum)
// may still be needed later for demo recording
sb_avel = p->adjustavel(sb_avel);
p->angle.applyinput(sb_avel, &actions);
p->angle.applyYaw(sb_avel, &actions);
}
if (p->spritebridge == 0 && pact->insector())

View file

@ -86,7 +86,7 @@ void GameInterface::GetInput(ControlInfo* const hidInput, double const scaleAdju
{
if (!nFreeze)
{
pPlayer->angle.applyinput(input.avel, &sPlayerInput[nLocalPlayer].actions, scaleAdjust);
pPlayer->angle.applyYaw(input.avel, &sPlayerInput[nLocalPlayer].actions, scaleAdjust);
pPlayer->horizon.applyPitch(input.horz, &sPlayerInput[nLocalPlayer].actions, scaleAdjust);
if (input.horz)

View file

@ -986,7 +986,7 @@ void AIPlayer::Tick(RunListEvent* ev)
if (SyncInput())
{
Player* pPlayer = &PlayerList[nPlayer];
pPlayer->angle.applyinput(sPlayerInput[nPlayer].nAngle, &sPlayerInput[nLocalPlayer].actions);
pPlayer->angle.applyYaw(sPlayerInput[nPlayer].nAngle, &sPlayerInput[nLocalPlayer].actions);
UpdatePlayerSpriteAngle(pPlayer);
}

View file

@ -1529,7 +1529,7 @@ void UpdatePlayerSpriteAngle(PLAYER* pp)
void DoPlayerTurn(PLAYER* pp, float const avel, double const scaleAdjust)
{
pp->angle.applyinput(avel, &pp->input.actions, scaleAdjust);
pp->angle.applyYaw(avel, &pp->input.actions, scaleAdjust);
UpdatePlayerSpriteAngle(pp);
}