mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-15 08:51:24 +00:00
- Rename PlayerAngle
prototypes in preparation for replacement work.
This commit is contained in:
parent
9b6f01dff0
commit
d75ac9e445
10 changed files with 10 additions and 10 deletions
|
@ -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.
|
// Process angle return to zeros.
|
||||||
scaletozero(ZzROTSCRNANG, YAW_LOOKRETURN, scaleAdjust);
|
scaletozero(ZzROTSCRNANG, YAW_LOOKRETURN, scaleAdjust);
|
||||||
|
|
|
@ -105,7 +105,7 @@ struct PlayerAngle
|
||||||
friend FSerializer& Serialize(FSerializer& arc, const char* keyname, PlayerAngle& w, PlayerAngle* def);
|
friend FSerializer& Serialize(FSerializer& arc, const char* keyname, PlayerAngle& w, PlayerAngle* def);
|
||||||
|
|
||||||
// Prototypes for functions in gameinput.cpp.
|
// 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.
|
// Interpolation helpers.
|
||||||
void backupYaw()
|
void backupYaw()
|
||||||
|
|
|
@ -62,7 +62,7 @@ void GameInterface::GetInput(ControlInfo* const hidInput, double const scaleAdju
|
||||||
// Perform unsynchronised angle/horizon if not dead.
|
// Perform unsynchronised angle/horizon if not dead.
|
||||||
if (pPlayer->actor->xspr.health != 0)
|
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);
|
pPlayer->horizon.applyPitch(input.horz, &pPlayer->input.actions, scaleAdjust);
|
||||||
doslopetilting(pPlayer, scaleAdjust);
|
doslopetilting(pPlayer, scaleAdjust);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1597,7 +1597,7 @@ void ProcessInput(PLAYER* pPlayer)
|
||||||
|
|
||||||
if (SyncInput())
|
if (SyncInput())
|
||||||
{
|
{
|
||||||
pPlayer->angle.applyinput(pInput->avel, &pInput->actions);
|
pPlayer->angle.applyYaw(pInput->avel, &pInput->actions);
|
||||||
}
|
}
|
||||||
|
|
||||||
// unconditionally update the player's sprite angle
|
// unconditionally update the player's sprite angle
|
||||||
|
|
|
@ -836,7 +836,7 @@ void GameInterface::GetInput(ControlInfo* const hidInput, double const scaleAdju
|
||||||
{
|
{
|
||||||
// Do these in the same order as the old code.
|
// Do these in the same order as the old code.
|
||||||
doslopetilting(p, scaleAdjust);
|
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->apply_seasick(scaleAdjust);
|
||||||
p->horizon.applyPitch(input.horz, &p->sync.actions, scaleAdjust);
|
p->horizon.applyPitch(input.horz, &p->sync.actions, scaleAdjust);
|
||||||
}
|
}
|
||||||
|
|
|
@ -2904,7 +2904,7 @@ void processinput_d(int snum)
|
||||||
// may still be needed later for demo recording
|
// may still be needed later for demo recording
|
||||||
|
|
||||||
sb_avel = p->adjustavel(sb_avel);
|
sb_avel = p->adjustavel(sb_avel);
|
||||||
p->angle.applyinput(sb_avel, &actions);
|
p->angle.applyYaw(sb_avel, &actions);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (p->spritebridge == 0 && pact->insector())
|
if (p->spritebridge == 0 && pact->insector())
|
||||||
|
|
|
@ -3559,7 +3559,7 @@ void processinput_r(int snum)
|
||||||
// may still be needed later for demo recording
|
// may still be needed later for demo recording
|
||||||
|
|
||||||
sb_avel = p->adjustavel(sb_avel);
|
sb_avel = p->adjustavel(sb_avel);
|
||||||
p->angle.applyinput(sb_avel, &actions);
|
p->angle.applyYaw(sb_avel, &actions);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (p->spritebridge == 0 && pact->insector())
|
if (p->spritebridge == 0 && pact->insector())
|
||||||
|
|
|
@ -86,7 +86,7 @@ void GameInterface::GetInput(ControlInfo* const hidInput, double const scaleAdju
|
||||||
{
|
{
|
||||||
if (!nFreeze)
|
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);
|
pPlayer->horizon.applyPitch(input.horz, &sPlayerInput[nLocalPlayer].actions, scaleAdjust);
|
||||||
|
|
||||||
if (input.horz)
|
if (input.horz)
|
||||||
|
|
|
@ -986,7 +986,7 @@ void AIPlayer::Tick(RunListEvent* ev)
|
||||||
if (SyncInput())
|
if (SyncInput())
|
||||||
{
|
{
|
||||||
Player* pPlayer = &PlayerList[nPlayer];
|
Player* pPlayer = &PlayerList[nPlayer];
|
||||||
pPlayer->angle.applyinput(sPlayerInput[nPlayer].nAngle, &sPlayerInput[nLocalPlayer].actions);
|
pPlayer->angle.applyYaw(sPlayerInput[nPlayer].nAngle, &sPlayerInput[nLocalPlayer].actions);
|
||||||
UpdatePlayerSpriteAngle(pPlayer);
|
UpdatePlayerSpriteAngle(pPlayer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1529,7 +1529,7 @@ void UpdatePlayerSpriteAngle(PLAYER* pp)
|
||||||
|
|
||||||
void DoPlayerTurn(PLAYER* pp, float const avel, double const scaleAdjust)
|
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);
|
UpdatePlayerSpriteAngle(pp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue