#include "sv_overkill.qh"
+#include "okshotgun.qh"
+#include "okhmg.qh"
+#include "okrpc.qh"
+
bool autocvar_g_overkill_powerups_replace;
bool autocvar_g_overkill_itemwaypoints = true;
.Weapon ok_lastwep[MAX_WEAPONSLOTS];
-IntrusiveList g_overkill_items;
-STATIC_INIT()
-{
- g_overkill_items = IL_NEW();
- IL_PUSH(g_overkill_items, ITEM_HealthMega);
- IL_PUSH(g_overkill_items, ITEM_ArmorSmall);
- IL_PUSH(g_overkill_items, ITEM_ArmorMedium);
- IL_PUSH(g_overkill_items, ITEM_ArmorBig);
- IL_PUSH(g_overkill_items, ITEM_ArmorMega);
-}
-
/// \brief Returns a random classname of the overkill item.
/// \param[in] prefix Prefix of the cvars that hold probabilities.
/// \return Random classname of the overkill item.
if(!STAT(FROZEN, frag_target))
if(!IS_DEAD(frag_target))
{
- Send_Notification(NOTIF_ONE, frag_attacker, MSG_CENTER, CENTER_SECONDARY_NODAMAGE);
M_ARGV(6, vector) = '0 0 0'; // force
}
entity frag_attacker = M_ARGV(1, entity);
entity frag_target = M_ARGV(2, entity);
- entity targ = ((frag_attacker) ? frag_attacker : frag_target);
+ entity targ = ((IS_PLAYER(frag_attacker)) ? frag_attacker : frag_target);
ok_DropItem(frag_target, targ);
{
return;
}
- if (!PHYS_INPUT_BUTTON_ATCK2(player) || forbidWeaponUse(player) ||
+ if (!PHYS_INPUT_BUTTON_ATCK2(player) || weaponLocked(player) ||
!(round_handler_IsActive() && !round_handler_IsRoundStarted()))
{
return;
if(WEP_OVERKILL_RPC.weaponstart > 0) { ok_start_items |= WEPSET(OVERKILL_RPC); }
if(WEP_OVERKILL_HMG.weaponstart > 0) { ok_start_items |= WEPSET(OVERKILL_HMG); }
- start_items |= IT_UNLIMITED_WEAPON_AMMO;
+ // this gives unlimited ammo (the 4 types) but not fuel
+ // using `g_use_ammunition` instead gives also fuel which is unnecessary and distracting in the HUD
+ start_items |= IT_UNLIMITED_AMMO;
+
start_weapons = warmup_start_weapons = ok_start_items;
}