mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-15 08:51:24 +00:00
- Exhumed: Make main loop player index aware.
This commit is contained in:
parent
c486940b2c
commit
3b889d5c36
2 changed files with 18 additions and 18 deletions
|
@ -287,8 +287,10 @@ void DoGameOverScene(bool finallevel)
|
||||||
//
|
//
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
void GameMove(void)
|
static void GameMove(void)
|
||||||
{
|
{
|
||||||
|
UpdateInterpolations();
|
||||||
|
|
||||||
FixPalette();
|
FixPalette();
|
||||||
|
|
||||||
ExhumedSpriteIterator it;
|
ExhumedSpriteIterator it;
|
||||||
|
@ -462,32 +464,27 @@ static void updatePlayerWeapon(Player* const pPlayer)
|
||||||
|
|
||||||
void GameInterface::Ticker()
|
void GameInterface::Ticker()
|
||||||
{
|
{
|
||||||
|
|
||||||
if (paused)
|
if (paused)
|
||||||
{
|
{
|
||||||
r_NoInterpolate = true;
|
r_NoInterpolate = true;
|
||||||
}
|
}
|
||||||
else if (EndLevel == 0)
|
else if (EndLevel == 0)
|
||||||
{
|
{
|
||||||
// Shorten some constant array accesses.
|
|
||||||
const auto pPlayer = &PlayerList[nLocalPlayer];
|
|
||||||
|
|
||||||
// this must be done before the view is backed up.
|
|
||||||
pPlayer->Angles.resetCameraAngles();
|
|
||||||
|
|
||||||
// disable synchronised input if set by game.
|
// disable synchronised input if set by game.
|
||||||
resetForcedSyncInput();
|
resetForcedSyncInput();
|
||||||
|
|
||||||
// set new player input.
|
for (int i = connecthead; i >= 0; i = connectpoint2[i])
|
||||||
pPlayer->input = playercmds[nLocalPlayer].ucmd;
|
{
|
||||||
|
const auto pPlayer = &PlayerList[i];
|
||||||
UpdateInterpolations();
|
pPlayer->Angles.resetCameraAngles();
|
||||||
|
pPlayer->input = playercmds[i].ucmd;
|
||||||
updatePlayerVelocity(pPlayer);
|
updatePlayerVelocity(pPlayer);
|
||||||
updatePlayerInventory(pPlayer);
|
updatePlayerInventory(pPlayer);
|
||||||
updatePlayerWeapon(pPlayer);
|
updatePlayerWeapon(pPlayer);
|
||||||
|
}
|
||||||
|
|
||||||
pPlayer->pTarget = Ra[nLocalPlayer].pTarget = bestTarget;
|
// this setup needs rewriting to work for all players in an MP game.
|
||||||
|
PlayerList[nLocalPlayer].pTarget = Ra[nLocalPlayer].pTarget = bestTarget;
|
||||||
|
|
||||||
GameMove();
|
GameMove();
|
||||||
|
|
||||||
|
@ -594,6 +591,10 @@ void GameInterface::app_init()
|
||||||
GrabPalette();
|
GrabPalette();
|
||||||
|
|
||||||
enginecompatibility_mode = ENGINECOMPATIBILITY_19961112;
|
enginecompatibility_mode = ENGINECOMPATIBILITY_19961112;
|
||||||
|
|
||||||
|
myconnectindex = connecthead = 0;
|
||||||
|
numplayers = 1;
|
||||||
|
connectpoint2[0] = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
|
|
|
@ -55,7 +55,6 @@ BEGIN_PS_NS
|
||||||
int nBestLevel;
|
int nBestLevel;
|
||||||
|
|
||||||
void RunCinemaScene(int num);
|
void RunCinemaScene(int num);
|
||||||
void GameMove(void);
|
|
||||||
void DrawClock();
|
void DrawClock();
|
||||||
double calc_interpfrac();
|
double calc_interpfrac();
|
||||||
void DoTitle(CompletionFunc completion);
|
void DoTitle(CompletionFunc completion);
|
||||||
|
|
Loading…
Reference in a new issue