31{
32 wpn = wpn.m_spawnfunc_hookreplace(wpn, this);
33 this.
classname = wpn.m_canonical_spawnfunc;
35 {
37 {
38
40 return;
41 }
42
46 if (s == "")
47 {
48 delete(this);
50 return;
51 }
53 if (t >= 2)
54 {
56 for (int i = 1; i < t; ++i)
57 {
60 if(wep != WEP_Null)
61 {
64 replacement.m_isreplaced = true;
66 }
67 }
68 }
69 if (t >= 1)
70 {
73 }
74 if (wpn == WEP_Null)
75 {
76 delete(this);
78 return;
79 }
80 }
81
84
86 {
87 delete(this);
89 return;
90 }
91
93 {
95 {
98 }
99 else
100 {
103 }
104 }
105
109
110
111
112 if ((wpn.ammo_type != RES_NONE) && !
GetResource(
this, wpn.ammo_type))
115
116 #if 0
117 if (wpn.items)
118 {
119 for (int i = 0, j = 1; i < 24; ++i, j <<= 1)
120 {
121 if (wpn.items & j)
122 {
123 ammotype = Item_CounterField(j);
124 if (!this.ammotype)
125 this.ammotype =
cvar(
strcat(
"g_pickup_", Item_CounterFieldName(j),
"_weapon"));
126 }
127 }
128 }
129 #endif
130
131
134
137 else
139
141
142 #if 0
144 wpn.wr_init(wpn);
145 }
146 #endif
147}
#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.
#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.
#define ITEM_IS_LOOT(item)
Returns whether the item is loot.
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
int GetAmmoConsumption(entity wpn)
Returns ammo consumed per shot by the primary/default fire mode.
#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