Multiplayer end of support. Simplify for ease of maintenance.

This commit is contained in:
Mari the Deer 2022-03-23 10:50:12 +01:00
commit 33f8e060b7
19 changed files with 32 additions and 271 deletions

View file

@ -92,10 +92,7 @@ Class SWWMArmor : Armor abstract
}
if ( !bNODRAIN ) amount -= saved;
damage = newdamage;
bool shouldautouse = false;
if ( swwm_enforceautousearmor == 1 ) shouldautouse = true;
else if ( swwm_enforceautousearmor == -1 ) shouldautouse = false;
else shouldautouse = CVar.GetCVar('swwm_autousearmor',Owner.player).GetBool();
bool shouldautouse = CVar.GetCVar('swwm_autousearmor',Owner.player).GetBool();
if ( (amount <= (MaxAmount-default.Amount)) && (Owner.CountInv(parent) > 0) && shouldautouse )
{
if ( GetDefaultByType(parent).UseSound ) Owner.A_StartSound(GetDefaultByType(parent).UseSound,CHAN_ITEMEXTRA,CHANF_OVERLAP,.6);

View file

@ -100,10 +100,7 @@ Class SWWMHealth : Inventory abstract
return; // this damage type is ignored by the player, so it does not affect us
if ( damageType == 'EndLevel' )
return; // don't trigger on endlevel damage
bool shouldautouse = false;
if ( swwm_enforceautousehealth == 1 ) shouldautouse = true;
else if ( swwm_enforceautousehealth == -1 ) shouldautouse = false;
else shouldautouse = CVar.GetCVar('swwm_autousehealth',Owner.player).GetBool();
bool shouldautouse = CVar.GetCVar('swwm_autousehealth',Owner.player).GetBool();
if ( !shouldautouse && !bBIGPOWERUP ) return; // powerup health is always auto-used
if ( (Owner.Health-damage <= (GetDefaultByType(giveme).MaxAmount-GetDefaultByType(giveme).Amount)) )
{

View file

@ -2274,10 +2274,7 @@ Class EBarrier : Inventory
else terrainwait++;
if ( terrainwait <= 20 ) return;
terrainwait = 0;
bool shouldautouse = false;
if ( swwm_enforceautousebarrier == 1 ) shouldautouse = true;
else if ( swwm_enforceautousebarrier == -1 ) shouldautouse = false;
else shouldautouse = CVar.GetCVar('swwm_autousebarrier',Owner.player).GetBool();
bool shouldautouse = CVar.GetCVar('swwm_autousebarrier',Owner.player).GetBool();
if ( shouldautouse ) Owner.UseInventory(self);
}