From: Freddy Date: Mon, 10 Oct 2016 18:22:48 +0000 (+0200) Subject: Replace g_overkill_100a_anyways and g_overkill_100h_anyways X-Git-Tag: xonotic-v0.8.2~521^2~3 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=ee6eba0b2e4d308e702aaf00a0a6a8816b177359;p=xonotic%2Fxonotic-data.pk3dir.git Replace g_overkill_100a_anyways and g_overkill_100h_anyways New cvars g_overkill_healthmega_remove, g_overkill_armormedium_remove g_overkill_armorbig_remove and g_overkill_armorlarge_remove determine what items are removed, unlike how the old cvars did --- diff --git a/mutators.cfg b/mutators.cfg index 2a5efcfda..090d79e5b 100644 --- a/mutators.cfg +++ b/mutators.cfg @@ -45,9 +45,11 @@ set g_instagib_friendlypush 1 "allow pushing teammates with the vaporizer primar // ========== set g_overkill 0 "enable overkill" -set g_overkill_100a_anyway 1 -set g_overkill_100h_anyway 1 set g_overkill_powerups_replace 1 +set g_overkill_healthmega_remove 0 +set g_overkill_armormedium_remove 1 +set g_overkill_armorbig_remove 1 +set g_overkill_armorlarge_remove 0 set g_overkill_ammo_charge 0 set g_overkill_ammo_charge_notice 1 diff --git a/qcsrc/common/mutators/mutator/overkill/sv_overkill.qc b/qcsrc/common/mutators/mutator/overkill/sv_overkill.qc index 35370df7e..eaeecea52 100644 --- a/qcsrc/common/mutators/mutator/overkill/sv_overkill.qc +++ b/qcsrc/common/mutators/mutator/overkill/sv_overkill.qc @@ -4,12 +4,15 @@ #include "rpc.qh" bool autocvar_g_overkill_powerups_replace; -bool autocvar_g_overkill_100h_anyway; -bool autocvar_g_overkill_100a_anyway; bool autocvar_g_overkill_ammo_charge; float autocvar_g_overkill_ammo_charge_notice; float autocvar_g_overkill_ammo_charge_limit; +bool autocvar_g_overkill_healthmega_remove; +bool autocvar_g_overkill_armormedium_remove; +bool autocvar_g_overkill_armorbig_remove; +bool autocvar_g_overkill_armorlarge_remove; + .vector ok_deathloc; .float ok_spawnsys_timer; .float ok_lastwep; @@ -305,12 +308,16 @@ MUTATOR_HOOKFUNCTION(ok, FilterItem) entity item = M_ARGV(0, entity); if(item.ok_item) - return; + return false; switch(item.items) { - case ITEM_HealthMega.m_itemid: return !(autocvar_g_overkill_100h_anyway); - case ITEM_ArmorMega.m_itemid: return !(autocvar_g_overkill_100a_anyway); + case ITEM_HealthMega.m_itemid: return autocvar_g_overkill_healthmega_remove; + case ITEM_ArmorMedium.m_itemid: return autocvar_g_overkill_armormedium_remove; + // WARNING: next two statements look wrong because of inconsistency between cvar names and code + // armor cvars need renaming to be consistent with their health counterparts + case ITEM_ArmorLarge.m_itemid: return autocvar_g_overkill_armorbig_remove; + case ITEM_ArmorMega.m_itemid: return autocvar_g_overkill_armorlarge_remove; } return true;