27 string cvar_name = sprintf(
"g_%s_%s_probability", prefix,
28 it.m_canonical_spawnfunc);
31 LOG_WARNF(
"Random items: cvar %s doesn't exist.", cvar_name);
36 string cvar_name = sprintf(
"g_%s_weapon_okhmg_probability", prefix);
39 LOG_WARNF(
"Random items: cvar %s doesn't exist.", cvar_name);
45 cvar_name = sprintf(
"g_%s_weapon_okrpc_probability", prefix);
48 LOG_WARNF(
"Random items: cvar %s doesn't exist.", cvar_name);
69 float frag_deathtype =
M_ARGV(3,
float);
87 if (itemlifetime <= 0)
96 e.itemdef = loot_itemdef;
97 e.origin = this.
origin +
'0 0 32';
98 e.velocity =
'0 0 200' +
normalize(attacker.origin -
this.origin) * 500;
99 e.lifetime = itemlifetime;
155 if (
weapon == WEP_Null && slot != 0)
176 entity thiswep = player.(weaponentity);
178 if(player.ok_lastwep[slot] && player.ok_lastwep[slot] != WEP_Null)
180 Weapon newwep = player.ok_lastwep[slot];
181 if(player.ok_lastwep[slot] == WEP_OVERKILL_HMG)
182 newwep = WEP_OVERKILL_MACHINEGUN;
183 if(player.ok_lastwep[slot] == WEP_OVERKILL_RPC)
184 newwep = WEP_OVERKILL_NEX;
185 thiswep.m_switchweapon = newwep;
186 player.ok_lastwep[slot] = WEP_Null;
198 case ITEM_HealthMega:
return true;
199 case ITEM_ArmorMedium:
return true;
200 case ITEM_ArmorBig:
return true;
201 case ITEM_ArmorMega:
return true;
238 if (item.classname ==
"item_strength")
244 wep.pickup_anyway =
true;
245 wep.itemdef = WEP_OVERKILL_HMG;
250 else if (item.classname ==
"item_shield")
256 wep.pickup_anyway =
true;
257 wep.itemdef = WEP_OVERKILL_RPC;
269 if(WEP_OVERKILL_RPC.weaponstart > 0) { ok_start_items |=
WEPSET(OVERKILL_RPC); }
270 if(WEP_OVERKILL_HMG.weaponstart > 0) { ok_start_items |=
WEPSET(OVERKILL_HMG); }
280 M_ARGV(0,
string) =
"off";
295 M_ARGV(0,
string) =
"Overkill";
#define MUTATOR_HOOKFUNCTION(...)
var entity(vector mins, vector maxs,.entity tofield) findbox_tofield_OrFallback
fields which are explicitly/manually set are marked with "M", fields set automatically are marked wit...
const int IT_UNLIMITED_AMMO
@ ITEM_FLAG_MUTATORBLOCKED
#define PHYS_INPUT_BUTTON_ATCK2(s)
float CVAR_TYPEFLAG_EXISTS
#define DEATH_ISWEAPON(t, w)
#define IL_EACH(this, cond, body)
entity Item_RandomFromList(string itemlist)
Takes a space-separated list of netnames, returns the itemdef of one of them (or NULL if none are ava...
bool Item_Initialise(entity item)
An optimised and generic way to initialise items (loot or permanent)
bool Item_IsDefinitionAllowed(entity definition)
Checks whether the items with the specified definition are allowed to spawn.
strcat(_("^F4Countdown stopped!"), "\n^BG", _("Teams are too unbalanced."))
ERASEABLE void RandomSelection_Init()
string RandomSelection_chosen_string
#define RandomSelection_AddString(s, weight, priority)
#define round_handler_IsActive()
#define round_handler_IsRoundStarted()
void Item_ScheduleRespawn(entity e)
void Item_CopyFields(entity this, entity to)
void Item_RespawnCountdown(entity this)
Weapon ok_lastwep[MAX_WEAPONSLOTS]
string autocvar_g_overkill_loot_monster
bool autocvar_g_overkill_itemwaypoints
bool autocvar_g_overkill_powerups_replace
bool autocvar_g_overkill_blaster_keepdamage
string autocvar_g_overkill_loot_player
float autocvar_g_overkill_loot_monster_time
float autocvar_g_overkill_loot_player_time
void ok_DropItem(entity this, entity attacker, string itemlist, float itemlifetime)
string RandomItems_GetRandomOverkillItemClassName(string prefix)
Returns a random classname of the overkill item.
bool ok_HandleItemWaypoints(entity e)
bool autocvar_g_overkill_blaster_keepforce
bool autocvar_g_overkill_filter_armormega
bool autocvar_g_overkill_filter_armorbig
bool autocvar_g_overkill_filter_healthmega
bool autocvar_g_overkill_filter_armormedium
IntrusiveList g_overkill_items
string RandomItems_GetRandomItemClassName(string prefix)
Returns a random classname of the item.
float autocvar_g_pickup_respawntime_superweapon
const int MAX_WEAPONSLOTS
entity weaponentities[MAX_WEAPONSLOTS]
bool weaponLocked(entity player)
WepSet warmup_start_weapons