#include "rpc.qh"
bool autocvar_g_overkill_powerups_replace;
-float autocvar_g_overkill_superguns_respawn_time;
-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_filter_healthmega;
+bool autocvar_g_overkill_filter_armormedium;
+bool autocvar_g_overkill_filter_armorbig;
+bool autocvar_g_overkill_filter_armorlarge;
-.vector ok_deathloc;
-.float ok_spawnsys_timer;
-.Weapon ok_lastwep[MAX_WEAPONSLOTS];
.float ok_item;
+.Weapon ok_lastwep[MAX_WEAPONSLOTS];
+
void ok_Initialize();
REGISTER_MUTATOR(ok, cvar("g_overkill") && !cvar("g_instagib") && !g_nexball && cvar_string("g_mod_balance") == "Overkill")
wep.noalign = ent.noalign;
wep.cnt = ent.cnt;
wep.team = ent.team;
- wep.respawntime = autocvar_g_overkill_superguns_respawn_time;
+ wep.respawntime = g_pickup_respawntime_superweapon;
wep.pickup_anyway = true;
wep.spawnfunc_checked = true;
setthink(wep, self_spawnfunc_weapon_hmg);
wep.noalign = ent.noalign;
wep.cnt = ent.cnt;
wep.team = ent.team;
- wep.respawntime = autocvar_g_overkill_superguns_respawn_time;
+ wep.respawntime = g_pickup_respawntime_superweapon;
wep.pickup_anyway = true;
wep.spawnfunc_checked = true;
setthink(wep, self_spawnfunc_weapon_rpc);
entity item = M_ARGV(0, entity);
if(item.ok_item)
- return;
+ return false;
- switch(item.items)
+ switch(item.itemdef)
{
- 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: return autocvar_g_overkill_filter_healthmega;
+ case ITEM_ArmorMedium: 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: return autocvar_g_overkill_filter_armorbig;
+ case ITEM_ArmorMega: return autocvar_g_overkill_filter_armorlarge;
}
return true;