mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-27 04:00:42 +00:00
- Exhumed: Replaced all checks for multiplayer levels with a single bool
This should make refactoring easier later.
This commit is contained in:
parent
dbcbdf2bc6
commit
378846c7bd
1 changed files with 9 additions and 8 deletions
|
@ -708,6 +708,7 @@ void FuncPlayer(int a, int nDamage, int nRun)
|
|||
{
|
||||
int var_48 = 0;
|
||||
int var_40;
|
||||
bool mplevel = currentLevel->levelNumber > 20;
|
||||
|
||||
short nPlayer = RunData[nRun].nVal;
|
||||
assert(nPlayer >= 0 && nPlayer < kMaxPlayers);
|
||||
|
@ -1485,7 +1486,7 @@ do_default:
|
|||
// loc_1B3C7
|
||||
|
||||
// CHECKME - is order of evaluation correct?
|
||||
if (currentLevel->levelNumber <= 20 || (var_70 >= 25 && (var_70 <= 25 || var_70 == 50)))
|
||||
if (!mplevel || (var_70 >= 25 && (var_70 <= 25 || var_70 == 50)))
|
||||
{
|
||||
DestroyItemAnim(nValB);
|
||||
mydeletesprite(nValB);
|
||||
|
@ -1941,7 +1942,7 @@ do_default_b:
|
|||
|
||||
if (weapons & var_18)
|
||||
{
|
||||
if (currentLevel->levelNumber > 20)
|
||||
if (mplevel)
|
||||
{
|
||||
AddAmmo(nPlayer, WeaponInfo[var_40].nAmmoType, ebx);
|
||||
}
|
||||
|
@ -2003,7 +2004,7 @@ do_default_b:
|
|||
|
||||
if (weapons & var_18)
|
||||
{
|
||||
if (currentLevel->levelNumber > 20)
|
||||
if (mplevel)
|
||||
{
|
||||
AddAmmo(nPlayer, WeaponInfo[var_40].nAmmoType, ebx);
|
||||
}
|
||||
|
@ -2065,7 +2066,7 @@ do_default_b:
|
|||
|
||||
if (weapons & var_18)
|
||||
{
|
||||
if (currentLevel->levelNumber > 20)
|
||||
if (mplevel)
|
||||
{
|
||||
AddAmmo(nPlayer, WeaponInfo[var_40].nAmmoType, ebx);
|
||||
}
|
||||
|
@ -2127,7 +2128,7 @@ do_default_b:
|
|||
|
||||
if (weapons & var_18)
|
||||
{
|
||||
if (currentLevel->levelNumber > 20)
|
||||
if (mplevel)
|
||||
{
|
||||
AddAmmo(nPlayer, WeaponInfo[var_40].nAmmoType, ebx);
|
||||
}
|
||||
|
@ -2189,7 +2190,7 @@ do_default_b:
|
|||
|
||||
if (weapons & var_18)
|
||||
{
|
||||
if (currentLevel->levelNumber > 20)
|
||||
if (mplevel)
|
||||
{
|
||||
AddAmmo(nPlayer, WeaponInfo[var_40].nAmmoType, ebx);
|
||||
}
|
||||
|
@ -2251,7 +2252,7 @@ do_default_b:
|
|||
|
||||
if (weapons & var_18)
|
||||
{
|
||||
if (currentLevel->levelNumber > 20)
|
||||
if (mplevel)
|
||||
{
|
||||
AddAmmo(nPlayer, WeaponInfo[var_40].nAmmoType, ebx);
|
||||
}
|
||||
|
@ -2708,7 +2709,7 @@ loc_1BD2E:
|
|||
}
|
||||
else
|
||||
{
|
||||
DoGameOverScene((currentLevel->levelNumber == 20));
|
||||
DoGameOverScene(mplevel);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue