17 string replacement =
"";
21 replacement = w.weaponreplace;
22 if (replacement ==
"") replacement = it;
24 if (replacement ==
"0")
continue;
25 out =
cons(out, replacement);
33 this.
classname = wpn.m_canonical_spawnfunc;
56 for (
int i = 1; i < t; ++i)
64 replacement.m_isreplaced =
true;
119 for (
int i = 0, j = 1; i < 24; ++i, j <<= 1)
123 ammotype = Item_CounterField(j);
125 this.ammotype =
cvar(
strcat(
"g_pickup_", Item_CounterFieldName(j),
"_weapon"));
#define MUTATOR_CALLHOOK(id,...)
var entity(vector mins, vector maxs,.entity tofield) findbox_tofield_OrFallback
void SetResource(entity e, Resource res_type, float amount)
Sets the current amount of resource the given entity will have.
float GetResource(entity e, Resource res_type)
Returns the current amount of resource the given entity has.
fields which are explicitly/manually set are marked with "M", fields set automatically are marked wit...
virtual void m_spawnfunc_hookreplace()
control what happens when this weapon is spawned
Resource ammo_type
M: ammotype : main ammo type.
vector m_color
M: color : waypointsprite color.
string netname
M: refname : reference name name.
int spawnflags
M: flags : WEPSPAWNFLAG_... combined.
virtual void wr_init()
(BOTH) precaches models/sounds used by this weapon, also sets up weapon properties
#define colormapPaletteColor(c, isPants)
vector weaponsInMapAll
all the weapons placed by the mapper (weaponreplace applied), ignores most filters
bool Item_IsDefinitionAllowed(entity definition)
Checks whether the items with the specified definition are allowed to spawn.
Header file that describes the functions related to game items.
#define ITEM_IS_LOOT(item)
Returns whether the item is loot.
#define FOREACH_WORD(words, cond, body)
strcat(_("^F4Countdown stopped!"), "\n^BG", _("Teams are too unbalanced."))
void Item_CopyFields(entity this, entity to)
void StartItem(entity this, entity def)
float autocvar_g_balance_superweapons_time
float superweapons_finished
ERASEABLE string cons(string a, string b)
int GetAmmoConsumption(entity wpn)
Returns ammo consumed per shot by the primary/default fire mode.
Header file that describes the resource system.
Weapon Weapon_from_name(string s)
#define WEP_CVAR(wep, name)
#define WepSet_FromWeapon(it)
bool m_isreplaced
Holds whether the weapon has been replaced.
string W_Apply_Weaponreplace(string in)
float autocvar_g_pickup_respawntimejitter_weapon
bool autocvar_g_pickup_weapons_anyway
float autocvar_g_pickup_respawntimejitter_superweapon
float autocvar_g_pickup_respawntime_weapon
float autocvar_g_pickup_respawntime_superweapon
void weapon_defaultspawnfunc(entity this, Weapon e)
const int WEP_FLAG_SUPERWEAPON
const int WEP_FLAG_MUTATORBLOCKED