Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
all.qh
Go to the documentation of this file.
1#pragma once
2
4#include <common/stats.qh>
5#include "config.qh"
6
7#include "weapon.qh"
8
9#ifdef SVQC
10void WriteWepSet(float dest, WepSet w);
11#endif
12
13#ifdef CSQC
17#endif
18
19#ifdef GAMEQC
20 #include "calculations.qh"
21 #include "projectiles.qh"
22 #include <common/models/all.qh>
23 #include <common/effects/all.qh>
24#endif
25
26#include <common/util.qh>
27
28REGISTRY(Weapons, 72) // Increase as needed. Can be up to 72.
30#ifdef GAMEQC
32{
33 FOREACH(Weapons, true,
34 {
35 if ((it.spawnflags & WEP_FLAG_SPECIALATTACK) && !(it.spawnflags & WEP_FLAG_HIDDEN))
36 error(sprintf("Special attack \"%s\" without WEP_FLAG_HIDDEN flag set.", it.m_name));
37 it.m_pickup = NEW(WeaponPickup, it);
38 });
39}
40#endif
41
42#ifdef SVQC
43#include <server/bot/api.qh>
44#endif
45
46.WepSet m_wepset;
47#define WEPSET(id) (WEP_##id.m_wepset)
48#define WepSet_FromWeapon(it) ((it).m_wepset)
50
52
53#define DEFAULT_FILENAME "weapons_dump.cfg"
54// NOTE: dumpeffectinfo, dumpnotifs, dumpturrets and dumpweapons use similar code
55GENERIC_COMMAND(dumpweapons, "Dump all weapons into " DEFAULT_FILENAME, false) // WEAPONTODO: make this work with other progs than just server
56{
57 switch (request)
58 {
60 {
61 #ifdef SVQC
62 wep_config_file = -1;
64 string filename = argv(1);
65
66 if (filename == "")
67 {
68 filename = DEFAULT_FILENAME;
70 }
71 else if (filename == "-")
72 {
73 filename = DEFAULT_FILENAME;
75 }
76 wep_config_file = fopen(filename, FILE_WRITE);
77
78 if (wep_config_file >= 0)
79 {
81 LOG_INFOF("Dumping weapons... File located in ^2data/data/%s^7.", filename);
83 wep_config_file = -1;
85 }
86 else
87 LOG_INFOF("^1Error: ^7Could not open file '%s'!", filename);
88 #else
89 LOG_INFO("Weapons dump command only works with sv_cmd.");
90 #endif
91 return;
92 }
93
94 default:
96 LOG_HELP("Usage:^3 ", GetProgramCommandPrefix(), " dumpweapons [<filename>]");
97 LOG_HELPF(" Where <filename> is the file to write (default is %s),", DEFAULT_FILENAME);
98 LOG_HELP(" if supplied with '-' output to console as well as default,");
99 LOG_HELP(" if left blank, it will only write to default.");
100 return;
101 }
102}
103#undef DEFAULT_FILENAME
104
105#ifdef SVQC
106entity W_PROP_reloader;
108.void(Weapon this, int) wr_net;
109
110void W_PROP_reload(int chan, entity to)
111{
112 W_PROP_reloader.nextthink = time + autocvar_w_prop_interval;
113 msg_entity = to;
114 FOREACH(Weapons, true,
115 {
116 it.wr_update(it);
117 void(Weapon, int) f = it.wr_net;
118 if (f)
119 f(it, chan);
120 });
121}
122
124{
126}
127
128STATIC_INIT_LATE(W_PROP_reloader)
129{
130 entity e = W_PROP_reloader = new_pure(W_PROP_reloader);
132 W_PROP_think(e);
133}
134#endif
135
136#define REGISTER_WEAPON(id, inst) REGISTER(Weapons, WEP, id, m_id, inst)
137
143
144#ifdef SVQC
146{
147 FOREACH(Weapons, it != WEP_Null && it.netname == s, return it);
148 return WEP_Null;
149}
150
152{
153 FOREACH(Weapons, it != WEP_Null && it.m_unique_impulse == imp, return it);
154 return WEP_Null;
155}
156#endif
157
158
159#ifdef GAMEQC
160
161// legacy w_prop mappings
162#define X(fld, T) .T fld; .T wepvar_##fld = fld;
163X(switchdelay_drop, float)
164X(switchdelay_raise, float)
165X(weaponreplace, string)
166X(weaponstartoverride, float)
167X(weaponstart, float)
168X(weaponthrowable, float)
169#ifdef SVQC
170X(reload_ammo, float)
171const .float reloading_ammo = reload_ammo;
173const .float reloading_time = reload_time;
174#endif
175#undef X
176
177#endif
178
179
180#ifdef CSQC
181 #define Read_int() ReadInt24_t()
182 #define Read_float() ReadFloat()
183 #define Read_string() ReadString()
184#else
185 #define Write_int(to, f) WriteInt24_t(to, f)
186 #define Write_float(to, f) WriteFloat(to, f)
187 #define Write_string(to, f) WriteString(to, f)
188#endif
189
190#define W_PROPS(L, class, prefix) \
191 L(W_PROP_BEGIN, W_PROP, W_PROP_END, class, prefix) \
192 L(W_CONFIG_BEGIN, W_CONFIG, W_CONFIG_END, class, prefix) \
193 L(W_UPDATE_BEGIN, W_UPDATE, W_UPDATE_END, class, prefix) \
194 L(W_NET_BEGIN, W_NET, W_NET_END, class, prefix) \
195 /**/ \
196
197
198 #define W_PROP(class, wepname, fld, T, m) W_PROP_##m(class, fld, T, wepname)
199 #define W_PROP_NONE(class, fld, T, wepname) _W_PROP(class, fld, T, wepname)
200 #define W_PROP_PRI(class, fld, T, wepname) _W_PROP(class, primary_##fld, T, wepname)
201 #define W_PROP_SEC(class, fld, T, wepname) _W_PROP(class, secondary_##fld, T, wepname)
202 #define W_PROP_BOTH(class, fld, T, wepname) \
203 W_PROP_PRI(class, fld, T, wepname) \
204 W_PROP_SEC(class, fld, T, wepname)
205 #define W_PROP_BEGIN(class)
206 #if defined(SVQC)
207 #define _W_PROP(class, fld, T, wepname) \
208 /* static */ T _W_PROP_CVAR(wepname, fld); \
209 ATTRIB(class, wepvar_##fld, T, _W_PROP_CVAR(wepname, fld));
210 #define _W_PROP_CVAR(wepname, fld) autocvar_g_balance_##wepname##_##fld
211 #elif defined(CSQC)
212 #define _W_PROP(class, fld, T, wepname) ATTRIB(class, wepvar_##fld, T);
213 #else
214 #define _W_PROP(class, fld, T, wepname)
215 #endif
216 #define W_PROP_END()
217
218
219
220 #define W_CONFIG(class, wepname, fld, T, m) W_CONFIG_##m(class, fld, T, wepname)
221 #define W_CONFIG_NONE(class, fld, T, wepname) _W_CONFIG(class, fld, T, wepname)
222 #define W_CONFIG_PRI(class, fld, T, wepname) _W_CONFIG(class, primary_##fld, T, wepname)
223 #define W_CONFIG_SEC(class, fld, T, wepname) _W_CONFIG(class, secondary_##fld, T, wepname)
224 #define W_CONFIG_BOTH(class, fld, T, wepname) \
225 W_CONFIG_PRI(class, fld, T, wepname) \
226 W_CONFIG_SEC(class, fld, T, wepname)
227 #ifdef SVQC
228 #define W_CONFIG_BEGIN(class) METHOD(class, wr_config, void(class this)) {
229 #define _W_CONFIG(class, fld, T, wepname) if (#wepname == this.netname) WEP_CONFIG_WRITE_CVARS(wepname, fld, T);
230 #define W_CONFIG_END() }
231 #else
232 #define W_CONFIG_BEGIN(class)
233 #define _W_CONFIG(class, fld, T, wepname)
234 #define W_CONFIG_END()
235 #endif
236
237
238 #define W_UPDATE(class, wepname, fld, T, m) W_UPDATE_##m(class, fld, T, wepname)
239 #define W_UPDATE_NONE(class, fld, T, wepname) _W_UPDATE(class, fld, T, wepname)
240 #define W_UPDATE_PRI(class, fld, T, wepname) _W_UPDATE(class, primary_##fld, T, wepname)
241 #define W_UPDATE_SEC(class, fld, T, wepname) _W_UPDATE(class, secondary_##fld, T, wepname)
242 #define W_UPDATE_BOTH(class, fld, T, wepname) \
243 W_UPDATE_PRI(class, fld, T, wepname) \
244 W_UPDATE_SEC(class, fld, T, wepname)
245 #ifdef GAMEQC
247 #define W_UPDATE_BEGIN(class) \
248 METHOD(class, wr_update, void(class this)) \
249 { \
250 noref entity b = this.baseline; \
251 if (!b) \
252 { \
253 b = this.baseline = new_pure(baseline); \
254 b.baseline_target = this; \
255 }
256 #ifdef SVQC
257 #define _W_UPDATE(class, fld, T, wepname) \
258 { \
259 T it = _W_PROP_CVAR(wepname, fld); \
260 b.wepvar_##fld = this.wepvar_##fld; \
261 this.wepvar_##fld = it; \
262 }
263 #else
264 #define _W_UPDATE(class, fld, T, wepname)
265 #endif
266 #define W_UPDATE_END() }
267 #else
268 #define W_UPDATE_BEGIN(class)
269 #define _W_UPDATE(class, fld, T, wepname)
270 #define W_UPDATE_END()
271 #endif
272
273
274 #define W_NET(class, wepname, fld, T, m) W_NET_##m(class, fld, T, wepname)
275 #define W_NET_NONE(class, fld, T, wepname) _W_NET(class, fld, T, wepname)
276 #define W_NET_PRI(class, fld, T, wepname) _W_NET(class, primary_##fld, T, wepname)
277 #define W_NET_SEC(class, fld, T, wepname) _W_NET(class, secondary_##fld, T, wepname)
278 #define W_NET_BOTH(class, fld, T, wepname) \
279 W_NET_PRI(class, fld, T, wepname) \
280 W_NET_SEC(class, fld, T, wepname)
281 #if defined(CSQC)
282 REGISTER_NET_TEMP(WeaponUpdate)
283 #define W_NET_BEGIN(class) \
284 METHOD(class, wr_net, void(class this, int i)) \
285 { \
286 int n = 0;
287 #define _W_NET(class, fld, T, wepname) \
288 { \
289 if (++n == i) \
290 this.wepvar_##fld = Read_##T(); \
291 }
292 #define W_NET_END() \
293 }
294 .void(Weapon this, int i) wr_net;
295 NET_HANDLE(WeaponUpdate, bool isnew)
296 {
298 for (int i; (i = ReadByte()); )
299 w.wr_net(w, i);
300 return true;
301 }
302 #elif defined(SVQC)
303 REGISTER_NET_TEMP(WeaponUpdate)
304 #define W_NET_BEGIN(class) \
305 METHOD(class, wr_net, void(class this, int chan)) \
306 { \
307 bool commit = false; \
308 int i = 0;
309 #define _W_NET(class, fld, T, wepname) \
310 { \
311 ++i; \
312 T it = this.wepvar_##fld; \
313 if (chan == MSG_ONE || it != this.baseline.wepvar_##fld) \
314 { \
315 if (!commit) \
316 { \
317 commit = true; \
318 WriteHeader(chan, WeaponUpdate); \
319 WriteRegistered(Weapons, chan, this); \
320 } \
321 WriteByte(chan, i); \
322 Write_##T(chan, it); \
323 } \
324 }
325 #define W_NET_END() \
326 if (commit) \
327 WriteByte(chan, 0); \
328 }
329 #else
330 #define W_NET_BEGIN(class)
331 #define _W_NET(class, fld, T, wepname)
332 #define W_NET_END()
333 #endif
334
335
336
337// read cvars from weapon settings
338// cvars are created as such: g_balance_wepname_name
339#define WEP_CVAR(wep, name) (wep.wepvar_##name)
340#define WEP_CVAR_PRI(wep, name) WEP_CVAR(wep, primary_##name)
341#define WEP_CVAR_SEC(wep, name) WEP_CVAR(wep, secondary_##name)
342#define WEP_CVAR_BOTH(wep, isprimary, name) ((isprimary) ? WEP_CVAR_PRI(wep, name) : WEP_CVAR_SEC(wep, name))
343
344const int WEP_FIRST = 1;
345#define WEP_LAST (REGISTRY_COUNT(Weapons) - 1)
348
349#include "all.inc"
350
351// TODO: invert after changes have been made to the hardcoded weapon impulses. Will require moving 'best weapon' impulses
352#define WEP_IMPULSE_BEGIN 230
353#define WEP_IMPULSE_END bound(WEP_IMPULSE_BEGIN, WEP_IMPULSE_BEGIN + (REGISTRY_COUNT(Weapons) - 1) - 1, 253)
354
357
358STATIC_INIT(register_weapons_done)
359{
360 string inaccessible = "";
362 FOREACH(Weapons, true,
363 {
364 WepSet set = it.m_wepset = _WepSet_FromWeapon(it.m_id = i);
365 WEPSET_ALL |= set;
366 if (it.spawnflags & WEP_FLAG_SUPERWEAPON)
367 WEPSET_SUPERWEAPONS |= set;
368 if (it == WEP_Null)
369 continue;
370 if (it.spawnflags & WEP_FLAG_SPECIALATTACK)
371 continue;
372 // TODO: this exists to filter out the Ball Stealer, otherwise we run out of impulses
373 if ((it.spawnflags & WEP_FLAG_MUTATORBLOCKED) && (it.spawnflags & WEP_TYPE_OTHER))
374 continue;
375
376 it.m_unique_impulse = imp;
377#ifdef CSQC
378 if (imp <= WEP_IMPULSE_END)
379 localcmd(sprintf("alias weapon_%s \"impulse %d\"\n", it.netname, imp)); // keep xonotic-client.cfg up to date
380 else
381#endif
382 inaccessible = strcat(inaccessible, "\n", it.netname);
383 ++imp;
384 });
385 if (inaccessible != "" && autocvar_developer > 0)
386 LOG_TRACEF("Impulse limit exceeded, weapon(s) will not be directly accessible: %s", inaccessible);
387 #ifdef CSQC
388 FOREACH(Weapons, true, it.wr_init(it));
389 #endif
390 #ifdef MENUQC
391 FOREACH(Weapons, (it.spawnflags & WEP_FLAG_HIDDEN) && (it.spawnflags & WEP_FLAG_SPECIALATTACK), it.m_hidden = true);
392 #endif
393 weaponorder_byid = "";
394 for (int i = REGISTRY_MAX(Weapons) - 1; i >= 1; --i)
395 if (REGISTRY_GET(Weapons, i))
398}
399
400#ifdef GAMEQC
401
405{
406 vector g = wep.wr_glow(wep, c, wepent);
407 if (!g)
408 g = colormapPaletteColor(c & 0x0F, true);
409 return g;
410}
411
413
414//.int weapon; // current weapon
415.string weaponname; // name of .weapon
416
417#ifdef SVQC
418.vector spawnorigin; // for casings
419#endif
420
421.vector movedir_aligned; // shot origin based on weapon alignment (unaffected by shootfromeye)
422
423// weapon animation vectors:
426.vector anim_idle;
428
430
431// static frame globals
432
433ENUMCLASS(WFRAME)
434CASE(WFRAME, DONTCHANGE)
435CASE(WFRAME, FIRE1)
436CASE(WFRAME, FIRE2)
437CASE(WFRAME, IDLE)
438CASE(WFRAME, RELOAD)
439ENUMCLASS_END(WFRAME)
440
441.WFRAME wframe;
442
443#ifdef SVQC
445 #define G_SHOOTFROMFIXEDORIGIN autocvar_g_shootfromfixedorigin
446#elif defined(CSQC)
447 string autocvar_cl_shootfromfixedorigin;
448 #define G_SHOOTFROMFIXEDORIGIN autocvar_cl_shootfromfixedorigin
449#endif
450
451vector shotorg_adjust(vector vecs, bool y_is_right, bool visual, int algn);
452void CL_WeaponEntity_SetModel(entity this, string name, bool _anim);
453
454REPLICATE_INIT(int, cvar_cl_gunalign);
455REPLICATE_INIT(bool, cvar_cl_weapon_switch_reload);
456REPLICATE_INIT(bool, cvar_cl_weapon_switch_fallback_to_impulse);
457REPLICATE_INIT(int, cvar_cl_weaponimpulsemode);
458
459REPLICATE_INIT(string, cvar_cl_weaponpriority);
460REPLICATE_INIT(string, cvar_cl_weaponpriorities[10]);
461
462#ifdef CSQC
463REPLICATE_INIT(bool, cvar_cl_accuracy_data_share);
464REPLICATE_INIT(bool, cvar_cl_accuracy_data_receive);
465#endif
466
467#ifdef SVQC
468void wframe_send(entity actor, entity weaponentity, int wepframe, float attackrate, bool restartanim);
469
470void W_MuzzleFlash(Weapon thiswep, entity actor, .entity weaponentity, vector shotorg, vector shotdir);
471
473string W_FixWeaponOrder_AllowIncomplete(entity this, string order);
474#endif
475
476#endif // GAMEQC
477
478// functions:
479string W_FixWeaponOrder(string order, float complete);
480string W_NameWeaponOrder(string order);
481string W_NumberWeaponOrder(string order);
482string W_FixWeaponOrder_BuildImpulseList(string o);
483string W_FixWeaponOrder_AllowIncomplete(entity this, string order);
484string W_FixWeaponOrder_ForceComplete(string order);
485WepSet W_RandomWeapons(entity e, WepSet remaining, int n);
486
487entity GetAmmoItem(Resource ammotype);
488entity GetAmmoResource(Ammo ammotype);
489
490#ifdef CSQC
491int GetAmmoStat(Resource ammotype);
492#endif
493
494string W_Sound(string w_snd);
495string W_Model(string w_mdl);
496
497
498#ifdef MENUQC
499string W_Guide_Keybinds(Weapon wep);
500
501string W_Guide_DPS_onlyOne_unnamed(string name);
502string W_Guide_DPS_onlyOne(string name, string fire);
504string W_Guide_DPS_onlyOne_andDirectHit(string name, string fire);
505string W_Guide_DPS(string name, string pri, string sec);
506string W_Guide_DPS_bothMultishot(string name, string pri, string sec);
507string W_Guide_DPS_secondaryMultishot(string name, string pri, string sec, string shots, string refire2, bool sec_variable);
508string W_Guide_DPS_primaryMultishot(string name, string pri, string sec, string shots, string refire2);
509string W_Guide_DPS_onlySecondary(string name, string sec);
510string W_Guide_DPS_onlyOneMultishot(string name, string fire, string shots, string refire2);
511string W_Guide_DPS_secondaryMultishotWithCombo(string name, string pri, string sec, string shots, string refire2, string combo, bool sec_variable);
512string W_Guide_DPS_primaryDPS(string name, string pri, string sec);
513#endif // MENUQC
vector shotorg
Definition aim.qh:10
vector shotdir
Definition aim.qh:11
var entity(vector mins, vector maxs,.entity tofield) findbox_tofield_OrFallback
Definition ammo.qh:26
bool m_hidden
Definition all.qh:139
fields which are explicitly/manually set are marked with "M", fields set automatically are marked wit...
Definition weapon.qh:37
virtual void wr_glow()
(BOTH) weapon specific glow
Definition weapon.qh:137
ATTRIB(Weapon, m_canonical_spawnfunc, string)
the canonical spawnfunc name
#define colormapPaletteColor(c, isPants)
Definition color.qh:5
const int CMD_REQUEST_COMMAND
Definition command.qh:3
const int CMD_REQUEST_USAGE
Definition command.qh:4
#define GENERIC_COMMAND(id, description, menubased)
Definition reg.qh:12
const float FILE_WRITE
float time
#define true
Definition csprogsdefs.qh:5
#define ENUMCLASS_END(id)
Definition enumclass.qh:24
#define CASE(class, id)
Definition enumclass.qh:23
#define ENUMCLASS(id)
Definition enumclass.qh:22
#define GetProgramCommandPrefix()
Definition generic.qh:25
#define X()
Weapons
Definition guide.qh:113
#define X(slot, imp)
Definition all.qh:36
#define FOREACH(list, cond, body)
Definition iter.qh:19
vector dest
Definition jumppads.qh:54
#define NET_HANDLE(id, param)
Definition net.qh:15
#define ReadRegistered(r)
Definition net.qh:290
int ReadByte()
#define REGISTER_NET_TEMP(id)
Definition net.qh:31
#define REPLICATE_INIT(type, name)
Definition replicate.qh:7
#define LOG_HELP(...)
Definition log.qh:83
#define LOG_TRACEF(...)
Definition log.qh:75
#define LOG_INFO(...)
Definition log.qh:62
noref int autocvar_developer
Definition log.qh:93
#define LOG_HELPF(...)
Definition log.qh:84
#define LOG_INFOF(...)
Definition log.qh:63
string name
Definition menu.qh:30
void localcmd(string command,...)
void fclose(float fhandle)
string substring(string s, float start, float length)
float fopen(string filename, float mode)
string ftos(float f)
string strzone(string s)
string argv(float n)
float MSG_ALL
Definition menudefs.qc:57
strcat(_("^F4Countdown stopped!"), "\n^BG", _("Teams are too unbalanced."))
#define DEFAULT_FILENAME
Definition all.qh:165
#define NEW(cname,...)
Definition oo.qh:120
#define CLASS(...)
Definition oo.qh:149
#define ENDCLASS(cname)
Definition oo.qh:286
#define new_pure(class)
purely logical entities (not linked to the area grid)
Definition oo.qh:66
#define NULL
Definition post.qh:14
#define error
Definition pre.qh:6
entity msg_entity
Definition progsdefs.qc:63
#define REGISTRY_SORT(...)
Definition registry.qh:163
#define REGISTER_REGISTRY(id)
Definition registry.qh:270
#define REGISTRY(id, max)
Declares a new registry.
Definition registry.qh:23
#define REGISTRY_CHECK(id)
Definition registry.qh:213
#define REGISTRY_DEFINE_GET(id, null)
Definition registry.qh:50
#define REGISTRY_GET(id, i)
Definition registry.qh:62
#define REGISTRY_MAX(id)
Definition registry.qh:17
#define setthink(e, f)
vector
Definition self.qh:96
void
Definition self.qh:76
int int int imp
Definition impulse.qc:90
#define STATIC_INIT_LATE(func)
directly after STATIC_INIT
Definition static.qh:38
#define STATIC_INIT(func)
during worldspawn
Definition static.qh:33
#define WEP_HARDCODED_IMPULSES
Definition all.inc:30
string W_FixWeaponOrder_ForceComplete(string order)
Definition all.qc:171
int m_gunalign
Definition all.qh:412
string W_FixWeaponOrder_AllowIncomplete(entity this, string order)
Definition all.qc:166
WepSet m_wepset
Definition all.qh:46
vector movedir_aligned
Definition all.qh:421
Weapon Weapon_from_name(string s)
Definition all.qh:145
vector anim_reload
Definition all.qh:427
void wframe_send(entity actor, entity weaponentity, int wepframe, float attackrate, bool restartanim)
Definition all.qc:577
void W_PROP_reload(int chan, entity to)
Definition all.qh:110
string W_Model(string w_mdl)
Definition all.qc:233
string W_Guide_Keybinds(Weapon wep)
Definition all.qc:824
float autocvar_w_prop_interval
Definition all.qh:107
void WriteWepSet(float dest, WepSet w)
Definition all.qc:69
vector anim_fire2
Definition all.qh:425
vector anim_idle
Definition all.qh:426
Weapon Weapon_from_impulse(int imp)
Definition all.qh:151
string W_Guide_DPS_primaryMultishot(string name, string pri, string sec, string shots, string refire2)
Definition all.qc:973
void CL_WeaponEntity_SetModel(entity this, string name, bool _anim)
supported formats:
Definition all.qc:341
WepSet WepSet_GetFromStat_InMap()
Definition all.qc:84
string W_Guide_DPS_secondaryMultishot(string name, string pri, string sec, string shots, string refire2, bool sec_variable)
Definition all.qc:955
entity baseline
Definition all.qh:246
int GetAmmoStat(Resource ammotype)
Definition all.qc:211
entity GetAmmoResource(Ammo ammotype)
Definition all.qc:203
vector weaponentity_glowmod(Weapon wep, int c, entity wepent)
Definition all.qh:404
string autocvar_g_shootfromfixedorigin
Definition all.qh:444
string W_NumberWeaponOrder(string order)
Definition all.qc:126
string W_FixWeaponOrder_BuildImpulseList(string o)
Definition all.qc:152
string W_Guide_DPS(string name, string pri, string sec)
Definition all.qc:918
string W_Sound(string w_snd)
Definition all.qc:226
#define WEP_IMPULSE_END
Definition all.qh:353
string W_Guide_DPS_bothMultishot(string name, string pri, string sec)
Definition all.qc:932
string W_NameWeaponOrder(string order)
Definition all.qc:115
string W_Guide_DPS_onlySecondary(string name, string sec)
Definition all.qc:946
string weaponname
Definition all.qh:415
entity baseline_target
Definition all.qh:246
const int WEP_FIRST
Definition all.qh:344
entity weaponchild
Definition all.qh:402
string W_Guide_DPS_onlyOne_andDirectHit(string name, string fire)
Definition all.qc:910
void W_MuzzleFlash(Weapon thiswep, entity actor,.entity weaponentity, vector shotorg, vector shotdir)
Definition all.qc:715
string W_FixWeaponOrder_ForceComplete_AndBuildImpulseList(entity this, string wo)
Definition all.qc:790
string W_Guide_DPS_secondaryMultishotWithCombo(string name, string pri, string sec, string shots, string refire2, string combo, bool sec_variable)
Definition all.qc:1002
WepSet WepSet_GetFromStat()
Definition all.qc:80
string W_Guide_DPS_onlyOneMultishot(string name, string fire, string shots, string refire2)
Definition all.qc:989
string W_Guide_DPS_onlyOne_unnamed(string name)
Definition all.qc:901
entity exteriorweaponentity
Definition all.qh:403
entity muzzle_flash
Definition all.qh:429
WepSet WEPSET_ALL
Definition all.qh:346
string W_FixWeaponOrder(string order, float complete)
Definition all.qc:99
vector anim_fire1
Definition all.qh:424
WFRAME wframe
Definition all.qh:441
#define WEP_IMPULSE_BEGIN
Definition all.qh:352
string W_Guide_DPS_onlyOne(string name, string fire)
Definition all.qc:914
#define REGISTER_WEAPON(id, inst)
Definition all.qh:136
WepSet WEPSET_SUPERWEAPONS
Definition all.qh:347
string W_Guide_DPS_primaryDPS(string name, string pri, string sec)
Definition all.qc:1028
entity GetAmmoItem(Resource ammotype)
Definition all.qc:196
void W_PROP_think(entity this)
Definition all.qh:123
WepSet ReadWepSet()
Definition all.qc:88
vector shotorg_adjust(vector vecs, bool y_is_right, bool visual, int algn)
Definition all.qc:260
int m_unique_impulse
Definition all.qh:51
vector spawnorigin
Definition all.qh:418
string W_Guide_DPS_onlyOne_unnamed_andDirectHit(string name)
Definition all.qc:889
WepSet _WepSet_FromWeapon(int i)
Definition all.qc:53
WepSet W_RandomWeapons(entity e, WepSet remaining, int n)
Definition all.qc:178
void Dump_Weapon_Settings()
Definition config.qc:30
bool wep_config_alsoprint
Definition config.qh:10
int wep_config_file
Definition config.qh:9
string weaponorder_byid
Definition weapon.qh:267
const int WEP_FLAG_SUPERWEAPON
powerup timer
Definition weapon.qh:255
const int WEP_FLAG_MUTATORBLOCKED
hides from impulse 99 etc. (mutators are allowed to clear this flag)
Definition weapon.qh:256
const int WEP_FLAG_HIDDEN
hides from menu
Definition weapon.qh:253
vector WepSet
Definition weapon.qh:14
const int WEP_TYPE_OTHER
not for damaging people
Definition weapon.qh:248
const int WEP_FLAG_SPECIALATTACK
special attack (not a true weapon); NOTE: if this flag is set then WEP_FLAG_HIDDEN must be set as wel...
Definition weapon.qh:264
float reload_time