#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;
-.vector ok_deathloc;
-.float ok_spawnsys_timer;
+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;
entity frag_target = M_ARGV(2, entity);
float frag_deathtype = M_ARGV(3, float);
- if(IS_PLAYER(frag_attacker) && IS_PLAYER(frag_target))
+ if(IS_PLAYER(frag_attacker) && (IS_PLAYER(frag_target) || IS_VEHICLE(frag_target) || IS_TURRET(frag_target)))
if(DEATH_ISWEAPON(frag_deathtype, WEP_BLASTER))
{
if(frag_attacker != frag_target)
- if(frag_target.health > 0)
- if(STAT(FROZEN, frag_target) == 0)
+ if(!STAT(FROZEN, frag_target))
if(!IS_DEAD(frag_target))
{
Send_Notification(NOTIF_ONE, frag_attacker, MSG_CENTER, CENTER_SECONDARY_NODAMAGE);
MUTATOR_HOOKFUNCTION(ok, PlayerPreThink)
{
- if(intermission_running || gameover)
+ if(gameover)
return;
entity player = M_ARGV(0, entity);
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.nextthink = time + 0.1;
return true;
}
-
- if(ent.classname == "item_invincible")
+ else if(ent.classname == "item_invincible")
{
entity wep = new(weapon_rpc);
setorigin(wep, ent.origin);
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;
+ 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");