mirror of
https://github.com/ZDoom/Raze.git
synced 2025-01-19 23:21:07 +00:00
- Exhumed: Change doPlayerDeathRestart()
to do an early return instead of nested branches.
This commit is contained in:
parent
b6c3753d3a
commit
dcfab3e57c
1 changed files with 27 additions and 30 deletions
|
@ -1565,12 +1565,11 @@ static void doPlayerAngles(Player* const pPlayer)
|
|||
|
||||
static bool doPlayerDeathRestart(Player* const pPlayer)
|
||||
{
|
||||
if (pPlayer->input.actions & SB_OPEN)
|
||||
{
|
||||
if (!(pPlayer->input.actions & SB_OPEN) || pPlayer->nAction < 16)
|
||||
return true;
|
||||
|
||||
pPlayer->input.actions &= ~SB_OPEN;
|
||||
|
||||
if (pPlayer->nAction >= 16)
|
||||
{
|
||||
if (pPlayer->nPlayer == nLocalPlayer)
|
||||
{
|
||||
StopAllSounds();
|
||||
|
@ -1598,8 +1597,6 @@ static bool doPlayerDeathRestart(Player* const pPlayer)
|
|||
DoGameOverScene(currentLevel->levelNumber == 20);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue