From: Freddy Date: Wed, 12 Oct 2016 14:39:46 +0000 (+0200) Subject: Improve overkill item filter cvars X-Git-Tag: xonotic-v0.8.2~521^2 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=472af75233c97aab86a393b900b63f43979897f2;p=xonotic%2Fxonotic-data.pk3dir.git Improve overkill item filter cvars --- diff --git a/mutators.cfg b/mutators.cfg index 552810453..c11e0e651 100644 --- a/mutators.cfg +++ b/mutators.cfg @@ -46,10 +46,10 @@ set g_instagib_friendlypush 1 "allow pushing teammates with the vaporizer primar set g_overkill 0 "enable overkill" set g_overkill_powerups_replace 1 -set g_overkill_healthmega_remove 0 -set g_overkill_armormedium_remove 0 -set g_overkill_armorbig_remove 0 -set g_overkill_armorlarge_remove 0 +set g_overkill_filter_healthmega 0 +set g_overkill_filter_armormedium 0 +set g_overkill_filter_armorbig 0 +set g_overkill_filter_armorlarge 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 10bb85bae..86bd70deb 100644 --- a/qcsrc/common/mutators/mutator/overkill/sv_overkill.qc +++ b/qcsrc/common/mutators/mutator/overkill/sv_overkill.qc @@ -8,10 +8,10 @@ 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; +bool autocvar_g_overkill_filter_healthmega; +bool autocvar_g_overkill_filter_armormedium; +bool autocvar_g_overkill_filter_armorbig; +bool autocvar_g_overkill_filter_armorlarge; .float ok_lastwep; .float ok_item; @@ -310,12 +310,12 @@ MUTATOR_HOOKFUNCTION(ok, FilterItem) switch(item.items) { - case ITEM_HealthMega.m_itemid: return autocvar_g_overkill_healthmega_remove; - case ITEM_ArmorMedium.m_itemid: return autocvar_g_overkill_armormedium_remove; + case ITEM_HealthMega.m_itemid: return autocvar_g_overkill_filter_healthmega; + case ITEM_ArmorMedium.m_itemid: return autocvar_g_overkill_filter_armormedium; // 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; + case ITEM_ArmorLarge.m_itemid: return autocvar_g_overkill_filter_armorbig; + case ITEM_ArmorMega.m_itemid: return autocvar_g_overkill_filter_armorlarge; } return true;