22 string cvar_name = sprintf(
"g_%s_%s_probability", prefix,
23 it.m_canonical_spawnfunc);
26 LOG_WARNF(
"Random items: cvar %s doesn't exist.", cvar_name);
31 string cvar_name = sprintf(
"g_%s_weapon_okhmg_probability", prefix);
34 LOG_WARNF(
"Random items: cvar %s doesn't exist.", cvar_name);
40 cvar_name = sprintf(
"g_%s_weapon_okrpc_probability", prefix);
41 if (!(cvar_type(cvar_name) & CVAR_TYPEFLAG_EXISTS))
43 LOG_WARNF(
"Random items: cvar %s doesn't exist.", cvar_name);
64 float frag_deathtype =
M_ARGV(3,
float);
69 if(frag_attacker != frag_target)
70 if(!STAT(FROZEN, frag_target))
85 '0 0 200' +
normalize(targ.origin -
this.origin) * 500, 5);
93 entity targ = ((
IS_PLAYER(frag_attacker)) ? frag_attacker : frag_target);
101 frag_target.ok_lastwep[slot] = frag_target.(weaponentity).m_switchweapon;
144 if (weapon == WEP_Null && slot != 0)
148 weapon.wr_think(weapon, player, weaponentity, 2);
165 entity thiswep = player.(weaponentity);
167 if(player.ok_lastwep[slot] && player.ok_lastwep[slot] != WEP_Null)
169 Weapon newwep = player.ok_lastwep[slot];
170 if(player.ok_lastwep[slot] == WEP_OVERKILL_HMG)
171 newwep = WEP_OVERKILL_MACHINEGUN;
172 if(player.ok_lastwep[slot] == WEP_OVERKILL_RPC)
173 newwep = WEP_OVERKILL_NEX;
174 thiswep.m_switchweapon = newwep;
175 player.ok_lastwep[slot] = WEP_Null;
187 case ITEM_HealthMega:
return true;
188 case ITEM_ArmorMedium:
return true;
189 case ITEM_ArmorBig:
return true;
190 case ITEM_ArmorMega:
return true;
227 if (item.classname ==
"item_strength")
229 entity wep =
new(weapon_okhmg);
234 wep.team = item.team;
235 wep.respawntime = g_pickup_respawntime_superweapon;
236 wep.pickup_anyway =
true;
237 wep.spawnfunc_checked =
true;
241 else if (item.classname ==
"item_shield")
243 entity wep =
new(weapon_okrpc);
248 wep.team = item.team;
249 wep.respawntime = g_pickup_respawntime_superweapon;
250 wep.pickup_anyway =
true;
251 wep.spawnfunc_checked =
true;
262 if(WEP_OVERKILL_RPC.weaponstart > 0) { ok_start_items |=
WEPSET(OVERKILL_RPC); }
263 if(WEP_OVERKILL_HMG.weaponstart > 0) { ok_start_items |=
WEPSET(OVERKILL_HMG); }
273 M_ARGV(0,
string) =
"off";
288 M_ARGV(0,
string) =
"Overkill";
#define PHYS_INPUT_BUTTON_ATCK2(s)
#define round_handler_IsActive()
#define IL_EACH(this, cond, body)
string RandomSelection_chosen_string
bool Item_IsDefinitionAllowed(entity definition)
Checks whether the items with the specified definition are allowed to spawn.
WepSet warmup_start_weapons
bool autocvar_g_overkill_powerups_replace
void Item_Initialize(entity item, string class_name)
Initializes the item according to class name.
ERASEABLE void RandomSelection_Init()
bool Item_InitializeLoot(entity item, string class_name, vector position, vector vel, float time_to_live)
Initializes the loot item.
float CVAR_TYPEFLAG_EXISTS
MUTATOR_HOOKFUNCTION(ok, RandomItems_GetRandomItemClassName)
#define RandomSelection_AddString(s, weight, priority)
#define round_handler_IsRoundStarted()
void PlayerPreThink(entity this)
bool autocvar_g_overkill_filter_healthmega
bool autocvar_g_overkill_filter_armorbig
string RandomItems_GetRandomOverkillItemClassName(string prefix)
Returns a random classname of the overkill item.
bool weaponLocked(entity player)
bool autocvar_g_overkill_filter_armormedium
IntrusiveList g_overkill_items
spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 f1 s1 strcat(_("Level %s: "), "^BG%s\3\, _("^BGPress ^F2%s^BG to enter the game"))
const int MAX_WEAPONSLOTS
string RandomItems_GetRandomItemClassName(string prefix)
Returns a random classname of the item.
bool autocvar_g_overkill_itemwaypoints
bool autocvar_g_overkill_filter_armormega
bool ok_HandleItemWaypoints(entity e)
vector(float skel, float bonenum) _skel_get_boneabs_hidden
Weapon ok_lastwep[MAX_WEAPONSLOTS]
bool Item_ShouldKeepPosition(entity item)
Returns whether item should keep its position or be dropped to the ground.
void Item_RespawnCountdown(entity this)
void ok_DropItem(entity this, entity targ)
entity weaponentities[MAX_WEAPONSLOTS]
#define DEATH_ISWEAPON(t, w)
fields which are explicitly/manually set are marked with "M", fields set automatically are marked wit...
void Item_ScheduleRespawn(entity e)