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_armormega;
.float ok_lastwep;
.float ok_item;
MUTATOR_HOOKFUNCTION(ok, PlayerPreThink)
{
- if(intermission_running || gameover)
+ if(gameover)
return;
entity player = M_ARGV(0, entity);
if(IS_DEAD(player) || !IS_PLAYER(player) || STAT(FROZEN, player))
return;
- if(player.ok_lastwep)
- {
- Weapon newwep = Weapons_from(player.ok_lastwep);
- if(player.ok_lastwep == WEP_HMG.m_id)
- newwep = WEP_MACHINEGUN;
- if(player.ok_lastwep == WEP_RPC.m_id)
- newwep = WEP_VORTEX;
- PS(player).m_switchweapon = newwep;
- player.ok_lastwep = 0;
- }
-
ok_IncreaseCharge(player, PS(player).m_weapon.m_id);
if(PHYS_INPUT_BUTTON_ATCK2(player))
}
else
player.ok_use_ammocharge = 0;
+}
- // if player changed their weapon while dead, don't switch to their death weapon
- if(player.impulse)
+MUTATOR_HOOKFUNCTION(ok, PlayerWeaponSelect)
+{
+ entity player = M_ARGV(0, entity);
+
+ if(player.ok_lastwep)
+ {
+ Weapon newwep = Weapons_from(player.ok_lastwep);
+ if(player.ok_lastwep == WEP_HMG.m_id)
+ newwep = WEP_MACHINEGUN;
+ if(player.ok_lastwep == WEP_RPC.m_id)
+ newwep = WEP_VORTEX;
+ PS(player).m_switchweapon = newwep;
player.ok_lastwep = 0;
+ }
}
void self_spawnfunc_weapon_hmg(entity this) { spawnfunc_weapon_hmg(this); }
if(item.ok_item)
return false;
- switch(item.items)
+ switch(item.itemdef)
{
- 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;
+ case ITEM_HealthMega: return autocvar_g_overkill_filter_healthmega;
+ case ITEM_ArmorMedium: return autocvar_g_overkill_filter_armormedium;
+ case ITEM_ArmorBig: return autocvar_g_overkill_filter_armorbig;
+ case ITEM_ArmorMega: return autocvar_g_overkill_filter_armormega;
}
return true;
start_weapons = warmup_start_weapons = ok_start_items;
}
+MUTATOR_HOOKFUNCTION(ok, SetWeaponArena)
+{
+ // turn weapon arena off
+ M_ARGV(0, string) = "off";
+}
+
MUTATOR_HOOKFUNCTION(ok, BuildMutatorsString)
{
M_ARGV(0, string) = strcat(M_ARGV(0, string), ":OK");