79 LOG_TRACE(
"^1WARNING!^7 this.mdl is unset for item ", this.
classname,
"expect a crash just about now");
118 if(!this.
itemdef.instanceOfPowerup)
125 if(
STAT(WEAPONS,
this) || this.
itemdef.instanceOfAmmo)
141 e.spawnshieldtime = 1;
149 e.spawnshieldtime = 1;
154 bool nostay = def.instanceOfWeaponPickup ? !!(def.m_weapon.m_wepset &
WEPSET_SUPERWEAPONS) :
false
163 e.spawnshieldtime = 0;
169 e.spawnshieldtime = 1;
189 setorigin(e, e.origin);
213 if (this.
itemdef.instanceOfPowerup)
275 if (wi != WEP_Null) {
276 entity wp =
WaypointSprite_Spawn(WP_Weapon, 0, 0,
this,
'0 0 64',
NULL, 0,
this,
waypointsprite_attached,
true, RADARICON_Weapon);
277 wp.wp_extra = wi.m_id;
284 entity wp =
WaypointSprite_Spawn(WP_Item, 0, 0,
this,
'0 0 64',
NULL, 0,
this,
waypointsprite_attached,
true, RADARICON_Item);
285 wp.wp_extra = ii.m_id;
334 e.item_respawncounter = 0;
346 e.scheduledrespawntime =
time + t;
358AUTOCVAR(g_pickup_respawntime_scaling_reciprocal,
float, 0.0,
"multiply respawn time by `reciprocal / (p + offset) + linear` where `p` is the current number of players, takes effect with 2 or more players present, `reciprocal` (with `offset` and `linear` set to \\\"0\\\") can be used to achieve a constant number of items spawned *per player*");
359AUTOCVAR(g_pickup_respawntime_scaling_offset,
float, 0.0,
"multiply respawn time by `reciprocal / (p + offset) + linear` where `p` is the current number of players, takes effect with 2 or more players present, `offset` offsets the curve left or right (NOTE: results are not intuitive and it is recommend to plot the respawn time and the number of items per player to see what's happening)");
360AUTOCVAR(g_pickup_respawntime_scaling_linear,
float, 1.0,
"multiply respawn time by `reciprocal / (p + offset) + linear` where `p` is the current number of players, takes effect with 2 or more players present, `linear` can be used to simply scale the respawn time linearly");
364 float r = autocvar_g_pickup_respawntime_scaling_reciprocal;
365 float o = autocvar_g_pickup_respawntime_scaling_offset;
366 float l = autocvar_g_pickup_respawntime_scaling_linear;
368 if (r == 0 && l == 1) {
369 return normal_respawntime;
385 return normal_respawntime * (r / (
players + o) + l);
387 return normal_respawntime;
393 if(e.respawntime > 0)
401 float respawn_in = adjusted_respawntime +
crandom() * e.respawntimejitter;
408AUTOCVAR(g_pickup_respawntime_initial_random,
int, 1,
409 "for items that don't start spawned; \\\"0\\\" = spawn after their normal respawntime, \\\"1\\\" = spawn after `random * respawntime` with the *same* random, \\\"2\\\" = same as 1 but each item has separate random");
416 if (autocvar_g_pickup_respawntime_initial_random == 0)
419 spawn_in = e.respawntime +
random() * e.respawntimejitter;
424 if (autocvar_g_pickup_respawntime_initial_random == 1)
426 static float shared_random = 0;
429 if (!shared_random ||
floor(
time) > shared_random)
449 if (num_weapons == 0)
454 for (
int give_attempt = 0; give_attempt < num_weapons; ++give_attempt)
457 for (
int weapon_index = 0; weapon_index < num_potential_weapons;
464 if (!(
STAT(WEAPONS, receiver) & it.m_wepset) && (it.netname ==
weapon))
498 float player_amount =
GetResource(player, res_type);
499 if (item.spawnshieldtime)
501 if ((player_amount >= ammomax) && (item.pickup_anyway <= 0))
506 ammomax =
min(amount, ammomax);
507 if(player_amount >= ammomax)
523 WriteHeader(MSG_ONE, TE_CSQC_WEAPONPICKUP);
524 WriteByte(MSG_ONE, wep);
531 int _switchweapon = 0;
536 bool use_cts_autoswitch = (
g_cts && item.itemdef.instanceOfWeaponPickup && (
CS_CVAR(player).cvar_cl_autoswitch_cts != -1));
537 if (
CS_CVAR(player).cvar_cl_autoswitch && !use_cts_autoswitch)
542 if (player.(weaponentity).m_weapon != WEP_Null || slot == 0)
544 if (player.(weaponentity).m_switchweapon ==
w_getbestweapon(player, weaponentity))
545 _switchweapon |=
BIT(slot);
548 _switchweapon |=
BIT(slot);
552 bool pickedup =
false;
553 pickedup |=
Item_GiveAmmoTo(item, player, RES_HEALTH, item.max_health);
560 if (item.itemdef.instanceOfWeaponPickup)
563 w =
STAT(WEAPONS, item);
564 wp = w &
~STAT(WEAPONS, player);
566 if (wp || (item.spawnshieldtime && item.pickup_anyway > 0))
570 if(w & (it.m_wepset))
573 if(wp & (it.m_wepset))
578 if(player.(weaponentity).m_weapon != WEP_Null || slot == 0)
579 W_DropEvent(wr_pickup, player, it.m_id, item, weaponentity);
587 if (item.itemdef.instanceOfPowerup)
589 if ((item.itemdef == ITEM_FuelRegen) && !(player.items &
IT_FUEL_REGEN))
591 else if ((item.itemdef == ITEM_Jetpack) && !(player.items &
IT_JETPACK))
604 if (item.strength_finished)
609 t += item.strength_finished;
611 t =
max(t,
time + item.strength_finished);
614 if (item.invincible_finished)
619 t += item.invincible_finished;
621 t =
max(t,
time + item.invincible_finished);
624 if (item.speed_finished)
629 t += item.speed_finished;
631 t =
max(t,
time + item.speed_finished);
634 if (item.invisibility_finished)
639 t += item.invisibility_finished;
641 t =
max(t,
time + item.invisibility_finished);
644 if (item.superweapons_finished)
658 if(use_cts_autoswitch)
661 if(
CS_CVAR(player).cvar_cl_autoswitch_cts == 1)
668 if(player.(weaponentity).m_weapon != WEP_Null || slot == 0)
674 else if(_switchweapon)
680 if(_switchweapon &
BIT(slot))
683 if(player.(weaponentity).m_switchweapon != best_wep)
779 it.scheduledrespawntime = 0;
780 RandomSelection_AddEnt(it, it.cnt, 0);
822 RandomSelection_AddEnt(it, it.cnt, 0);
836 if (it.waypointsprite_attached)
837 WaypointSprite_Kill(it.waypointsprite_attached);
845 it.effects &= ~EF_NOGUNBOB;
852 setorigin(to, this.
origin);
857 to.spawnfunc_checked =
true;
866 if(wasfreed(
this) || !
this) {
return; }
889 if(
STAT(WEAPONS, player) &
STAT(WEAPONS, item))
892 if(!item.spawnshieldtime)
899 int weapons_value = 0;
901 weapons_value += it.bot_pickupbasevalue;
903 c -=
bound(0, weapons_value / 20000, 1) * 0.5;
905 return item.bot_pickupbasevalue * c;
916 if(item.itemdef.instanceOfWeaponPickup)
918 entity res = item.itemdef.m_weapon.ammo_type;
926 rating =
ammo.m_botvalue;
931 if(!(
STAT(WEAPONS, player) & (it.m_wepset)))
933 if(it.ammo_type == RES_NONE)
938 item_resource = it.ammo_type;
942 rating = item.bot_pickupbasevalue;
945 float noammorating = 0.5;
952 rating += wpn.bot_pickupbasevalue * 0.1;
959 float rating = item.bot_pickupbasevalue;
966 itemarmor *=
min(4, item.item_group_count);
967 itemhealth *=
min(4, item.item_group_count);
973 if (itemhealth && (
GetResource(player, RES_HEALTH) < item.max_health))
994 int old_status = this.
active;
1000 if(this.
active != old_status)
1006 if (def.m_spawnfunc_hookreplace)
1007 def = def.m_spawnfunc_hookreplace(def,
this);
1009 if (def.m_canonical_spawnfunc !=
"")
1010 this.
classname = def.m_canonical_spawnfunc;
1016 def.m_iteminit(def,
this);
1019 this.
items = def.m_itemid;
1020 this.
weapon = def.instanceOfWeaponPickup ? def.m_weapon.m_id : 0;
1057 setsize (
this, this.
pos1 = def.m_mins,
this.pos2 = def.m_maxs);
1086 nudgeoutofsolid_OrFallback(
this);
1108 if (def.m_respawntime)
1111 LOG_WARNF(
"Default respawntime for a %s is unavailable from its itemdef", this.
classname);
1116 if(this.
angles !=
'0 0 0')
1125 if(t) this.
team = crc16(
false, t);
1131 setorigin(
this, this.
origin);
1172 LOG_TRACE(
"XXX Found duplicated item: ", def.m_name, vtos(this.origin));
1173 LOG_TRACE(
" vs ", it.netname, vtos(it.origin));
1174 error(
"Mapper sucks.");
1181 if ( def.instanceOfPowerup
1182 || def.instanceOfWeaponPickup
1183 || (def.instanceOfHealth && def != ITEM_HealthSmall)
1184 || (def.instanceOfArmor && def != ITEM_ArmorSmall)
1189 this.
target =
"###item###";
1198 this.bot_pickupevalfunc = def.m_pickupevalfunc;
1206 this.
skin = def.m_skin;
1209 if(def.instanceOfPowerup)
1216 if(def.instanceOfWeaponPickup)
1238 Net_LinkEntity(
this, !(def.instanceOfPowerup || def.instanceOfHealth || def.instanceOfArmor), 0,
ItemSend);
1257#define IS_SMALL(def) ((def.instanceOfHealth && def == ITEM_HealthSmall) || (def.instanceOfArmor && def == ITEM_ArmorSmall))
1267 if(!this.item_group)
1271 it.item_group = group_count;
1274 this.item_group = it.item_group;
1279 it.item_group = this.item_group;
1280 else if(it.item_group != this.item_group)
1282 int grY = it.item_group;
1284 IL_EACH(g_items, IS_SMALL(it.itemdef),
1286 if(it.item_group == grY)
1287 it.item_group = this.item_group;
1347 if(
argv(0) ==
"give")
1353 for(
int j = 0; j < n; ++j)
1359 else if(
argv(j) ==
"strength") this.
items |= ITEM_Strength.m_itemid;
1360 else if(
argv(j) ==
"invincible") this.
items |= ITEM_Shield.m_itemid;
1361 else if(
argv(j) ==
"speed") this.
items |= ITEM_Speed.m_itemid;
1362 else if(
argv(j) ==
"invisibility") this.
items |= ITEM_Invisibility.m_itemid;
1364 else if(
argv(j) ==
"jetpack") this.
items |= ITEM_Jetpack.m_itemid;
1365 else if(
argv(j) ==
"fuel_regen") this.
items |= ITEM_FuelRegen.m_itemid;
1368 FOREACH(StatusEffects, it.instanceOfBuff,
1370 string s = Buff_CompatName(argv(j));
1374 if(!this.buffs_finished)
1375 this.buffs_finished = it.m_time(it);
1381 if(s == it.netname || s == it.m_deprecated_netname)
1383 STAT(WEAPONS,
this) |= (it.m_wepset);
1392 string itemprefix, valueprefix;
1400 itemprefix =
"max ";
1401 valueprefix =
"max ";
1405 itemprefix =
"min ";
1406 valueprefix =
"min ";
1410 itemprefix =
"minus ";
1411 valueprefix =
"max ";
1415 error(
"invalid spawnflags");
1420 str = sprintf(
"%s %s%d %s", str, itemprefix,
boolean(this.
items &
IT_UNLIMITED_AMMO),
"unlimited_weapon_ammo");
1422 str = sprintf(
"%s %s%d %s", str, valueprefix, this.
strength_finished *
boolean(this.
items & ITEM_Strength.m_itemid),
"strength");
1423 str = sprintf(
"%s %s%d %s", str, valueprefix, this.
invincible_finished *
boolean(this.
items & ITEM_Shield.m_itemid),
"invincible");
1424 str = sprintf(
"%s %s%d %s", str, valueprefix, this.
invisibility_finished *
boolean(this.
items & ITEM_Invisibility.m_itemid),
"invisibility");
1425 str = sprintf(
"%s %s%d %s", str, valueprefix, this.
speed_finished *
boolean(this.
items & ITEM_Speed.m_itemid),
"speed");
1427 str = sprintf(
"%s %s%d %s", str, itemprefix,
boolean(this.
items & ITEM_Jetpack.m_itemid),
"jetpack");
1428 str = sprintf(
"%s %s%d %s", str, itemprefix,
boolean(this.
items & ITEM_FuelRegen.m_itemid),
"fuel_regen");
1430 res =
GetResource(
this, RES_SHELLS);
if(res != 0) str = sprintf(
"%s %s%d %s", str, valueprefix,
max(0, res),
"shells");
1431 res =
GetResource(
this, RES_BULLETS);
if(res != 0) str = sprintf(
"%s %s%d %s", str, valueprefix,
max(0, res),
"nails");
1432 res =
GetResource(
this, RES_ROCKETS);
if(res != 0) str = sprintf(
"%s %s%d %s", str, valueprefix,
max(0, res),
"rockets");
1433 res =
GetResource(
this, RES_CELLS);
if(res != 0) str = sprintf(
"%s %s%d %s", str, valueprefix,
max(0, res),
"cells");
1434 res =
GetResource(
this, RES_FUEL);
if(res != 0) str = sprintf(
"%s %s%d %s", str, valueprefix,
max(0, res),
"fuel");
1435 res =
GetResource(
this, RES_HEALTH);
if(res != 0) str = sprintf(
"%s %s%d %s", str, valueprefix,
max(0, res),
"health");
1436 res =
GetResource(
this,
RES_ARMOR);
if(res != 0) str = sprintf(
"%s %s%d %s", str, valueprefix,
max(0, res),
"armor");
1437 FOREACH(StatusEffects, it.instanceOfBuff, str = sprintf(
"%s %s%d %s", str, valueprefix, this.
buffs_finished *
boolean(this.
buffdef == it), it.netname));
1438 FOREACH(
Weapons, it != WEP_Null, str = sprintf(
"%s %s%d %s", str, itemprefix, !!(
STAT(WEAPONS,
this) & (it.m_wepset)), it.netname));
1443 for(
int j = 0; j < n; ++j)
1457 v0 = (
STAT(WEAPONS, e) & s);
1462 STAT(WEAPONS, e) |= s;
1464 STAT(WEAPONS, e) &= ~s;
1469 STAT(WEAPONS, e) |= s;
1473 STAT(WEAPONS, e) &= ~s;
1477 STAT(WEAPONS, e) &= ~s;
1480 v1 = (
STAT(WEAPONS, e) & s);
1491 new_buff_time =
time + val;
1494 new_buff_time =
max(new_buff_time,
time + val);
1497 new_buff_time =
min(new_buff_time,
time + val);
1500 new_buff_time += val;
1503 new_buff_time -= val;
1506 if(new_buff_time <=
time)
1517 return (had_buff != have_buff);
1526 if(snd_decr !=
NULL)
1529 else if(v0 >= v0 + t)
1531 if(snd_incr !=
NULL)
1536void GiveRot(
entity e,
float v0,
float v1, .
float rotfield,
float rottime, .
float regenfield,
float regentime)
1539 e.(rotfield) =
max(e.(rotfield),
time + rottime);
1541 e.(regenfield) =
max(e.(regenfield),
time + regentime);
1550 case OP_SET: new_val = val;
break;
1551 case OP_MIN: new_val =
max(v0, val);
break;
1552 case OP_MAX: new_val =
min(v0, val);
break;
1553 case OP_PLUS: new_val = v0 + val;
break;
1554 case OP_MINUS: new_val = v0 - val;
break;
1555 default:
return false;
1567 new_eff_time =
time + val;
1570 new_eff_time =
max(new_eff_time,
time + val);
1573 new_eff_time =
min(new_eff_time,
time + val);
1576 new_eff_time += val;
1579 new_eff_time -= val;
1582 if(new_eff_time <=
time)
1590 return (had_eff != have_eff);
1595 float got, i, val, op;
1603 int _switchweapon = 0;
1605 bool use_cts_autoswitch = (
g_cts && (
CS_CVAR(e).cvar_cl_autoswitch_cts != -1));
1606 if(
CS_CVAR(e).cvar_cl_autoswitch && !use_cts_autoswitch)
1611 if(e.(weaponentity).m_weapon != WEP_Null || slot == 0)
1612 if(e.(weaponentity).m_switchweapon ==
w_getbestweapon(e, weaponentity))
1613 _switchweapon |=
BIT(slot);
1632 Weapon last_wep = WEP_Null;
1633 for(i = beginarg; i < endarg; ++i)
1661 got +=
GiveBit(e,
items, ITEM_FuelRegen.m_itemid, op, val);
1665 got +=
GiveBit(e,
items, ITEM_Jetpack.m_itemid, op, val);
1680 case "unlimited_ammo":
1684 case "unlimited_weapon_ammo":
1687 case "unlimited_superweapons":
1691 got +=
GiveBit(e,
items, ITEM_Jetpack.m_itemid, op, val);
1694 got +=
GiveBit(e,
items, ITEM_FuelRegen.m_itemid, op, val);
1706 case "invisibility":
1709 case "superweapons":
1737 got += GiveBuff(e, it, op, val);
1741 got += GiveWeapon(e, it.m_id, op, val);
1742 if(use_cts_autoswitch && CS_CVAR(e).cvar_cl_autoswitch_cts == 1)
1743 if(val > 0 && (op == OP_SET || op == OP_PLUS || op == OP_MIN))
1759 if(!(save_weapons & (it.m_wepset)))
1760 if(
STAT(WEAPONS, e) & (it.m_wepset))
1785 if(use_cts_autoswitch)
1788 if(last_wep != WEP_Null)
1789 if(
CS_CVAR(e).cvar_cl_autoswitch_cts == 1)
1795 if(e.(weaponentity).m_weapon != WEP_Null || slot == 0)
1807 if(e.(weaponentity).m_weapon != WEP_Null || slot == 0)
1809 _switchweapon |=
BIT(slot);
1811 if(_switchweapon &
BIT(slot))
1814 if(e.(weaponentity).m_switchweapon != best_wep)
void waypoint_spawnforitem(entity e)
#define MUTATOR_CALLHOOK(id,...)
#define BIT(n)
Only ever assign into the first 24 bits in QC (so max is BIT(23)).
ERASEABLE bool GiveBit(entity e,.int fld, int bit, int op, int val)
float bot_pickupbasevalue
string Buff_CompatName(string buffname)
var entity(vector mins, vector maxs,.entity tofield) findbox_tofield_OrFallback
void TakeResourceWithLimit(entity receiver, Resource res_type, float amount, float limit)
Takes an entity some resource but not less than a limit.
float GetResource(entity e, Resource res_type)
Returns the current amount of resource the given entity has.
bool SetResourceExplicit(entity e, Resource res_type, float amount)
Sets the resource amount of an entity without calling any hooks.
fields which are explicitly/manually set are marked with "M", fields set automatically are marked wit...
int autocvar_g_pickup_rockets_max
int autocvar_g_pickup_fuel_max
int autocvar_g_pickup_shells_max
int autocvar_g_pickup_cells_max
int autocvar_g_pickup_nails_max
const float IT_UPDATE_INTERVAL
const int IT_UNLIMITED_AMMO
const int IT_UNLIMITED_SUPERWEAPONS
float invincible_finished
@ ITEM_FLAG_MUTATORBLOCKED
#define ITEM_HANDLE(signal,...)
const float IT_DESPAWNFX_TIME
#define setmodel(this, m)
vector weaponsInMap
all the weapons actually spawned in the map, does not include filtered items
const int INITPRIO_FINDTARGET
const float SOLID_TRIGGER
float trace_dpstartcontents
const float EF_FULLBRIGHT
const float EF_NODEPTHTEST
void W_SwitchWeapon_Force(Player this, Weapon w,.entity weaponentity)
ERASEABLE entity IL_PUSH(IntrusiveList this, entity it)
Push to tail.
#define IL_EACH(this, cond, body)
float invisibility_finished
float autocvar_g_balance_powerup_invisibility_time
#define ITEM_IS_LOOT(item)
Returns whether the item is loot.
#define ITEM_IS_EXPIRING(item)
Returns whether the item is expiring (i.e.
#define ITEM_SHOULD_KEEP_POSITION(item)
Returns whether item should keep its position or be dropped to the ground.
#define FOREACH_ENTITY_RADIUS(org, dist, cond, body)
#define FOREACH(list, cond, body)
void SUB_UseTargets(entity this, entity actor, entity trigger)
#define WriteHeader(to, id)
void Net_LinkEntity(entity e, bool docull, float dt, bool(entity this, entity to, int sendflags) sendfunc)
#define EXACTTRIGGER_TOUCH(e, t)
void set_movetype(entity this, int mt)
float autocvar_g_balance_powerup_speed_time
@ STATUSEFFECT_REMOVE_CLEAR
Effect is being forcibly removed without calling any additional mechanics.
@ STATUSEFFECT_REMOVE_NORMAL
Effect is being removed by a function, calls regular removal mechanics.
void Send_Notification(NOTIF broadcast, entity client, MSG net_type, Notification net_name,...count)
ERASEABLE void RandomSelection_Init()
#define RandomSelection_AddEnt(e, weight, priority)
entity RandomSelection_chosen_ent
#define crandom()
Returns a random number between -1.0 and 1.0.
#define REGISTRY_GET(id, i)
bool client_hasweapon(entity this, Weapon wpn,.entity weaponentity, float andammo, bool complain)
#define w_getbestweapon(ent, wepent)
float pauserotfuel_finished
float pauseregen_finished
float pauserothealth_finished
float pauserotarmor_finished
float generic_pickupevalfunc(entity player, entity item)
bool Item_ItemsTime_SpectatorOnly(GameItem it)
float ammo_pickupevalfunc(entity player, entity item)
float Item_ItemsTime_UpdateTime(entity e, float t)
void Item_NotifyWeapon(entity player, int wep)
void GiveRot(entity e, float v0, float v1,.float rotfield, float rottime,.float regenfield, float regentime)
float adjust_respawntime(float normal_respawntime)
Adjust respawn time according to the number of players.
void Item_ScheduleRespawn(entity e)
void Item_ItemsTime_SetTimesForAllPlayers()
void Item_CopyFields(entity this, entity to)
bool GiveStatusEffect(entity e, StatusEffect this, int op, float val)
bool GiveBuff(entity e, Buff thebuff, int op, int val)
bool ItemSend(entity this, entity to, int sf)
void Item_RespawnThink(entity this)
bool Item_GiveAmmoTo(entity item, entity player, Resource res_type, float ammomax)
void Item_Damage(entity this, entity inflictor, entity attacker, float damage, int deathtype,.entity weaponentity, vector hitloc, vector force)
void ItemUpdate(entity this)
void StartItem(entity this, entity def)
void Item_ScheduleInitialRespawn(entity e)
void Item_ScheduleRespawnIn(entity e, float t)
void UpdateItemAfterTeleport(entity this)
void RemoveItem(entity this)
float weapon_pickupevalfunc(entity player, entity item)
float GiveWeapon(entity e, float wpn, float op, float val)
void Item_Think(entity this)
void Item_RespawnCountdown(entity this)
void Item_Show(entity e, int mode)
void setItemGroup(entity this)
void item_use(entity this, entity actor, entity trigger)
void Item_ItemsTime_SetTime(entity e, float t)
void Item_FindTeam(entity this)
float GiveItems(entity e, float beginarg, float endarg)
bool have_pickup_item(entity this)
bool Item_ItemsTime_Allow(GameItem it)
void Item_Reset(entity this)
bool GiveResourceValue(entity e, Resource res_type, int op, int val)
float healtharmor_pickupevalfunc(entity player, entity item)
void target_items_use(entity this, entity actor, entity trigger)
void item_setactive(entity this, int act)
void GiveSound(entity e, float v0, float v1, float t, Sound snd_incr, Sound snd_decr)
void GiveRandomWeapons(entity receiver, int num_weapons, string weapon_names, entity ammo_entity)
Give several random weapons and ammo to the entity.
bool Item_GiveTo(entity item, entity player)
void Item_Respawn(entity this)
void Item_Touch(entity this, entity toucher)
float autocvar_g_balance_superweapons_time
entity item_pickupsound_ent
int autocvar_g_pickup_items
float item_respawncounter
#define ITEM_TOUCH_NEEDKILL()
#define ITEM_DAMAGE_NEEDKILL(dt)
#define POSTGIVE_WEAPON(e, b, snd_incr, snd_decr)
float autocvar_sv_simple_items
#define PREGIVE_WEAPONS(e)
#define POSTGIVE_RESOURCE(e, f, t, snd_incr, snd_decr)
bool autocvar_g_fullbrightitems
#define PREGIVE_STATUSEFFECT(e, f)
float superweapons_finished
const float ITEM_RESPAWN_TICKS
#define PREGIVE_RESOURCE(e, f)
float autocvar_g_items_maxdist
bool autocvar_g_nodepthtestitems
#define POSTGIVE_STATUSEFFECT(e, f, snd_incr, snd_decr)
float item_spawnshieldtime
#define POSTGIVE_RES_ROT(e, f, t, rotfield, rottime, regenfield, regentime, snd_incr, snd_decr)
#define POSTGIVE_BIT(e, f, b, snd_incr, snd_decr)
float autocvar_g_items_dropped_lifetime
string GetField_fullspawndata(entity e, string fieldname, bool vfspath)
Retrieves the value of a map entity field from fullspawndata.
float autocvar_sys_ticrate
void W_GiveWeapon(entity e, int wep)
float autocvar_g_balance_powerup_invincible_time
const int CH_TRIGGER_SINGLE
#define Sound_fixpath(this)
#define _sound(e, c, s, v, a)
#define sound(e, c, s, v, a)
void soundto(int _dest, entity e, int chan, string samp, float vol, float _atten, float _pitch)
void StatusEffects_remove(StatusEffect this, entity actor, int removal_type)
float StatusEffects_gettime(StatusEffect this, entity actor)
bool StatusEffects_active(StatusEffect this, entity actor)
void StatusEffects_apply(StatusEffect this, entity actor, float eff_time, int eff_flags)
void StatusEffects_update(entity e)
float autocvar_g_balance_powerup_strength_time
float buff_Available(entity buff)
void buff_RemoveAll(entity actor, int removal_type)
void powerups_DropItem_Think(entity this)
bool autocvar_g_powerups_stack
void GiveResource(entity receiver, Resource res_type, float amount)
Gives an entity some resource.
float GetResourceLimit(entity e, Resource res_type)
Returns the maximum amount of the given resource.
void GiveResourceWithLimit(entity receiver, Resource res_type, float amount, float limit)
Gives an entity some resource but not more than a limit.
float autocvar_g_balance_pause_fuel_regen
float autocvar_g_balance_pause_armor_rot
float autocvar_g_balance_pause_health_rot
float autocvar_g_balance_pause_health_regen
float autocvar_g_balance_pause_fuel_rot
void TeamBalance_Destroy(entity balance)
Destroy the team balance entity.
int TeamBalance_GetNumberOfPlayers(entity balance, int index)
Returns the number of players (both humans and bots) in a team.
void TeamBalance_GetTeamCounts(entity balance, entity ignore)
Counts the number of players and various other information about each team.
entity TeamBalance_CheckAllowedTeams(entity for_whom)
Checks whether the player can join teams according to global configuration and mutator settings.
bool TeamBalance_IsTeamAllowed(entity balance, int index)
Returns whether the team change to the specified team is allowed.
const int NUM_TEAMS
Number of teams in the game.
#define IS_REAL_CLIENT(v)
#define FOREACH_CLIENT(cond, body)
void WaypointSprite_Kill(entity wp)
void WaypointSprite_Ping(entity e)
entity WaypointSprite_Spawn(entity spr, float _lifetime, float maxdistance, entity ref, vector ofs, entity showto, float t, entity own,.entity ownfield, float hideable, entity icon)
void WaypointSprite_UpdateBuildFinished(entity e, float f)
void WaypointSprite_UpdateRule(entity e, float t, float r)
entity waypointsprite_attached
const int SPRITERULE_SPECTATOR
entity GetAmmoItem(Resource ammotype)
WepSet WEPSET_SUPERWEAPONS
#define WepSet_FromWeapon(it)
const int MAX_WEAPONSLOTS
entity weaponentities[MAX_WEAPONSLOTS]
const int WEP_FLAG_MUTATORBLOCKED
const int WEP_FLAG_HIDDEN
void W_DropEvent(.void(Weapon, entity actor,.entity) event, entity player, int weapon_type, entity weapon_item,.entity weaponentity)
void DropToFloor_QC_DelayedInit(entity this)
void InitializeEntity(entity e, void(entity this) func, int order)