- Exhumed: Move updatePlayerTarget() call back to main ticker loop.

* While it's cleaner in the AIPlayer ticker, AIRa requires its target set (which is done in this func also) and I don't know whether AIPlayer is ticked before AIRa is.
This commit is contained in:
Mitchell Richters 2023-04-17 15:35:58 +10:00
parent 19da7a61bb
commit 29bf5e4cce
3 changed files with 2 additions and 1 deletions

View file

@ -354,6 +354,7 @@ void GameInterface::Ticker()
const auto pPlayer = &PlayerList[i];
pPlayer->Angles.resetCameraAngles();
pPlayer->input = playercmds[i].ucmd;
updatePlayerTarget(pPlayer);
}
GameMove();

View file

@ -1811,7 +1811,6 @@ static bool doPlayerInput(Player* const pPlayer)
// updatePlayerAction() needs access to bUnderwater.
updatePlayerViewSector(pPlayer, nMove, spr_pos, spr_vel, bUnderwater);
updatePlayerFloorActor(pPlayer);
updatePlayerTarget(pPlayer);
updatePlayerInventory(pPlayer);
updatePlayerWeapon(pPlayer);
updatePlayerAction(pPlayer, bUnderwater);

View file

@ -122,6 +122,7 @@ int GetPlayerFromActor(DExhumedActor* actor);
void SetPlayerMummified(int nPlayer, int bIsMummified);
int AddAmmo(int nPlayer, int nWeapon, int nAmmoAmount);
void ShootStaff(int nPlayer);
void updatePlayerTarget(Player* const pPlayer);
inline void doPlayerVertPanning(Player* const pPlayer, const double nDestVertPan)
{