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
145{
146 FOREACH(Weapons, it != WEP_Null && it.netname == s, return it);
147 return WEP_Null;
148}
149
151{
152 FOREACH(Weapons, it != WEP_Null && it.m_unique_impulse == imp, return it);
153 return WEP_Null;
154}
155
156
157#ifdef GAMEQC
158
159// legacy w_prop mappings
160#define X(fld, T) .T fld; .T wepvar_##fld = fld;
161X(switchdelay_drop, float)
162X(switchdelay_raise, float)
163X(weaponreplace, string)
164X(weaponstartoverride, float)
165X(weaponstart, float)
166X(weaponthrowable, float)
167#ifdef SVQC
168X(reload_ammo, float)
169const .float reloading_ammo = reload_ammo;
171const .float reloading_time = reload_time;
172#endif
173#undef X
174
175#endif
176
177
178#ifdef CSQC
179 #define Read_int() ReadInt24_t()
180 #define Read_float() ReadFloat()
181 #define Read_string() ReadString()
182#else
183 #define Write_int(to, f) WriteInt24_t(to, f)
184 #define Write_float(to, f) WriteFloat(to, f)
185 #define Write_string(to, f) WriteString(to, f)
186#endif
187
188#define W_PROPS(L, class, prefix) \
189 L(W_PROP_BEGIN, W_PROP, W_PROP_END, class, prefix) \
190 L(W_CONFIG_BEGIN, W_CONFIG, W_CONFIG_END, class, prefix) \
191 L(W_UPDATE_BEGIN, W_UPDATE, W_UPDATE_END, class, prefix) \
192 L(W_NET_BEGIN, W_NET, W_NET_END, class, prefix) \
193 /**/ \
194
195
196 #define W_PROP(class, wepname, fld, T, m) W_PROP_##m(class, fld, T, wepname)
197 #define W_PROP_NONE(class, fld, T, wepname) _W_PROP(class, fld, T, wepname)
198 #define W_PROP_PRI(class, fld, T, wepname) _W_PROP(class, primary_##fld, T, wepname)
199 #define W_PROP_SEC(class, fld, T, wepname) _W_PROP(class, secondary_##fld, T, wepname)
200 #define W_PROP_BOTH(class, fld, T, wepname) \
201 W_PROP_PRI(class, fld, T, wepname) \
202 W_PROP_SEC(class, fld, T, wepname)
203 #define W_PROP_BEGIN(class)
204 #if defined(SVQC)
205 #define _W_PROP(class, fld, T, wepname) \
206 /* static */ T _W_PROP_CVAR(wepname, fld); \
207 ATTRIB(class, wepvar_##fld, T, _W_PROP_CVAR(wepname, fld));
208 #define _W_PROP_CVAR(wepname, fld) autocvar_g_balance_##wepname##_##fld
209 #elif defined(CSQC)
210 #define _W_PROP(class, fld, T, wepname) ATTRIB(class, wepvar_##fld, T);
211 #else
212 #define _W_PROP(class, fld, T, wepname)
213 #endif
214 #define W_PROP_END()
215
216
217
218 #define W_CONFIG(class, wepname, fld, T, m) W_CONFIG_##m(class, fld, T, wepname)
219 #define W_CONFIG_NONE(class, fld, T, wepname) _W_CONFIG(class, fld, T, wepname)
220 #define W_CONFIG_PRI(class, fld, T, wepname) _W_CONFIG(class, primary_##fld, T, wepname)
221 #define W_CONFIG_SEC(class, fld, T, wepname) _W_CONFIG(class, secondary_##fld, T, wepname)
222 #define W_CONFIG_BOTH(class, fld, T, wepname) \
223 W_CONFIG_PRI(class, fld, T, wepname) \
224 W_CONFIG_SEC(class, fld, T, wepname)
225 #ifdef SVQC
226 #define W_CONFIG_BEGIN(class) METHOD(class, wr_config, void(class this)) {
227 #define _W_CONFIG(class, fld, T, wepname) if (#wepname == this.netname) WEP_CONFIG_WRITE_CVARS(wepname, fld, T);
228 #define W_CONFIG_END() }
229 #else
230 #define W_CONFIG_BEGIN(class)
231 #define _W_CONFIG(class, fld, T, wepname)
232 #define W_CONFIG_END()
233 #endif
234
235
236 #define W_UPDATE(class, wepname, fld, T, m) W_UPDATE_##m(class, fld, T, wepname)
237 #define W_UPDATE_NONE(class, fld, T, wepname) _W_UPDATE(class, fld, T, wepname)
238 #define W_UPDATE_PRI(class, fld, T, wepname) _W_UPDATE(class, primary_##fld, T, wepname)
239 #define W_UPDATE_SEC(class, fld, T, wepname) _W_UPDATE(class, secondary_##fld, T, wepname)
240 #define W_UPDATE_BOTH(class, fld, T, wepname) \
241 W_UPDATE_PRI(class, fld, T, wepname) \
242 W_UPDATE_SEC(class, fld, T, wepname)
243 #ifdef GAMEQC
245 #define W_UPDATE_BEGIN(class) \
246 METHOD(class, wr_update, void(class this)) \
247 { \
248 noref entity b = this.baseline; \
249 if (!b) \
250 { \
251 b = this.baseline = new_pure(baseline); \
252 b.baseline_target = this; \
253 }
254 #ifdef SVQC
255 #define _W_UPDATE(class, fld, T, wepname) \
256 { \
257 T it = _W_PROP_CVAR(wepname, fld); \
258 b.wepvar_##fld = this.wepvar_##fld; \
259 this.wepvar_##fld = it; \
260 }
261 #else
262 #define _W_UPDATE(class, fld, T, wepname)
263 #endif
264 #define W_UPDATE_END() }
265 #else
266 #define W_UPDATE_BEGIN(class)
267 #define _W_UPDATE(class, fld, T, wepname)
268 #define W_UPDATE_END()
269 #endif
270
271
272 #define W_NET(class, wepname, fld, T, m) W_NET_##m(class, fld, T, wepname)
273 #define W_NET_NONE(class, fld, T, wepname) _W_NET(class, fld, T, wepname)
274 #define W_NET_PRI(class, fld, T, wepname) _W_NET(class, primary_##fld, T, wepname)
275 #define W_NET_SEC(class, fld, T, wepname) _W_NET(class, secondary_##fld, T, wepname)
276 #define W_NET_BOTH(class, fld, T, wepname) \
277 W_NET_PRI(class, fld, T, wepname) \
278 W_NET_SEC(class, fld, T, wepname)
279 #if defined(CSQC)
280 REGISTER_NET_TEMP(WeaponUpdate)
281 #define W_NET_BEGIN(class) \
282 METHOD(class, wr_net, void(class this, int i)) \
283 { \
284 int n = 0;
285 #define _W_NET(class, fld, T, wepname) \
286 { \
287 if (++n == i) \
288 this.wepvar_##fld = Read_##T(); \
289 }
290 #define W_NET_END() \
291 }
292 .void(Weapon this, int i) wr_net;
293 NET_HANDLE(WeaponUpdate, bool isnew)
294 {
296 for (int i; (i = ReadByte()); )
297 w.wr_net(w, i);
298 return true;
299 }
300 #elif defined(SVQC)
301 REGISTER_NET_TEMP(WeaponUpdate)
302 #define W_NET_BEGIN(class) \
303 METHOD(class, wr_net, void(class this, int chan)) \
304 { \
305 bool commit = false; \
306 int i = 0;
307 #define _W_NET(class, fld, T, wepname) \
308 { \
309 ++i; \
310 T it = this.wepvar_##fld; \
311 if (chan == MSG_ONE || it != this.baseline.wepvar_##fld) \
312 { \
313 if (!commit) \
314 { \
315 commit = true; \
316 WriteHeader(chan, WeaponUpdate); \
317 WriteRegistered(Weapons, chan, this); \
318 } \
319 WriteByte(chan, i); \
320 Write_##T(chan, it); \
321 } \
322 }
323 #define W_NET_END() \
324 if (commit) \
325 WriteByte(chan, 0); \
326 }
327 #else
328 #define W_NET_BEGIN(class)
329 #define _W_NET(class, fld, T, wepname)
330 #define W_NET_END()
331 #endif
332
333
334
335// read cvars from weapon settings
336// cvars are created as such: g_balance_wepname_name
337#define WEP_CVAR(wep, name) (wep.wepvar_##name)
338#define WEP_CVAR_PRI(wep, name) WEP_CVAR(wep, primary_##name)
339#define WEP_CVAR_SEC(wep, name) WEP_CVAR(wep, secondary_##name)
340#define WEP_CVAR_BOTH(wep, isprimary, name) ((isprimary) ? WEP_CVAR_PRI(wep, name) : WEP_CVAR_SEC(wep, name))
341
342const int WEP_FIRST = 1;
343#define WEP_LAST (REGISTRY_COUNT(Weapons) - 1)
346
347#include "all.inc"
348
349// TODO: invert after changes have been made to the hardcoded weapon impulses. Will require moving 'best weapon' impulses
350#define WEP_IMPULSE_BEGIN 230
351#define WEP_IMPULSE_END bound(WEP_IMPULSE_BEGIN, WEP_IMPULSE_BEGIN + (REGISTRY_COUNT(Weapons) - 1) - 1, 253)
352
355
356STATIC_INIT(register_weapons_done)
357{
358 string inaccessible = "";
360 FOREACH(Weapons, true,
361 {
362 WepSet set = it.m_wepset = _WepSet_FromWeapon(it.m_id = i);
363 WEPSET_ALL |= set;
364 if (it.spawnflags & WEP_FLAG_SUPERWEAPON)
365 WEPSET_SUPERWEAPONS |= set;
366 if (it == WEP_Null)
367 continue;
368 if (it.spawnflags & WEP_FLAG_SPECIALATTACK)
369 continue;
370 // TODO: this exists to filter out the Ball Stealer, otherwise we run out of impulses
371 if ((it.spawnflags & WEP_FLAG_MUTATORBLOCKED) && (it.spawnflags & WEP_TYPE_OTHER))
372 continue;
373
374 it.m_unique_impulse = imp;
375#ifdef CSQC
376 if (imp <= WEP_IMPULSE_END)
377 localcmd(sprintf("alias weapon_%s \"impulse %d\"\n", it.netname, imp)); // keep xonotic-client.cfg up to date
378 else
379#endif
380 inaccessible = strcat(inaccessible, "\n", it.netname);
381 ++imp;
382 });
383 if (inaccessible != "" && autocvar_developer > 0)
384 LOG_TRACEF("Impulse limit exceeded, weapon(s) will not be directly accessible: %s", inaccessible);
385 #ifdef CSQC
386 FOREACH(Weapons, true, it.wr_init(it));
387 #endif
388 #ifdef MENUQC
389 FOREACH(Weapons, (it.spawnflags & WEP_FLAG_HIDDEN) && (it.spawnflags & WEP_FLAG_SPECIALATTACK), it.m_hidden = true);
390 #endif
391 weaponorder_byid = "";
392 for (int i = REGISTRY_MAX(Weapons) - 1; i >= 1; --i)
393 if (REGISTRY_GET(Weapons, i))
396}
397
398#ifdef GAMEQC
399
403{
404 vector g = wep.wr_glow(wep, c, wepent);
405 if (!g)
406 g = colormapPaletteColor(c & 0x0F, true);
407 return g;
408}
409
411
412//.int weapon; // current weapon
413.string weaponname; // name of .weapon
414
415#ifdef SVQC
416.vector spawnorigin; // for casings
417#endif
418
419.vector movedir_aligned; // shot origin based on weapon alignment (unaffected by shootfromeye)
420
421// weapon animation vectors:
424.vector anim_idle;
426
428
429// static frame globals
430
431ENUMCLASS(WFRAME)
432CASE(WFRAME, DONTCHANGE)
433CASE(WFRAME, FIRE1)
434CASE(WFRAME, FIRE2)
435CASE(WFRAME, IDLE)
436CASE(WFRAME, RELOAD)
437ENUMCLASS_END(WFRAME)
438
439.WFRAME wframe;
440
441#ifdef SVQC
443 #define G_SHOOTFROMFIXEDORIGIN autocvar_g_shootfromfixedorigin
444#elif defined(CSQC)
445 string autocvar_cl_shootfromfixedorigin;
446 #define G_SHOOTFROMFIXEDORIGIN autocvar_cl_shootfromfixedorigin
447#endif
448
449vector shotorg_adjust(vector vecs, bool y_is_right, bool visual, int algn);
450void CL_WeaponEntity_SetModel(entity this, string name, bool _anim);
451
452REPLICATE_INIT(int, cvar_cl_gunalign);
453REPLICATE_INIT(bool, cvar_cl_weapon_switch_reload);
454REPLICATE_INIT(bool, cvar_cl_weapon_switch_fallback_to_impulse);
455REPLICATE_INIT(int, cvar_cl_weaponimpulsemode);
456
457REPLICATE_INIT(string, cvar_cl_weaponpriority);
458REPLICATE_INIT(string, cvar_cl_weaponpriorities[10]);
459
460#ifdef CSQC
461REPLICATE_INIT(bool, cvar_cl_accuracy_data_share);
462REPLICATE_INIT(bool, cvar_cl_accuracy_data_receive);
463#endif
464
465#ifdef SVQC
466void wframe_send(entity actor, entity weaponentity, int wepframe, float attackrate, bool restartanim);
467
468void W_MuzzleFlash(Weapon thiswep, entity actor, .entity weaponentity, vector shotorg, vector shotdir);
469
471string W_FixWeaponOrder_AllowIncomplete(entity this, string order);
472#endif
473
474#endif // GAMEQC
475
476// functions:
477string W_FixWeaponOrder(string order, float complete);
478string W_NameWeaponOrder(string order);
479string W_NumberWeaponOrder(string order);
480string W_FixWeaponOrder_BuildImpulseList(string o);
481string W_FixWeaponOrder_AllowIncomplete(entity this, string order);
482string W_FixWeaponOrder_ForceComplete(string order);
483WepSet W_RandomWeapons(entity e, WepSet remaining, int n);
484
485entity GetAmmoItem(Resource ammotype);
486entity GetAmmoResource(Ammo ammotype);
487
488#ifdef CSQC
489int GetAmmoStat(Resource ammotype);
490#endif
491
492string W_Sound(string w_snd);
493string W_Model(string w_mdl);
494
495
496#ifdef MENUQC
497string W_Guide_Keybinds(Weapon wep);
498
499string W_Guide_DPS_onlyOne_unnamed(string name);
500string W_Guide_DPS_onlyOne(string name, string fire);
502string W_Guide_DPS_onlyOne_andDirectHit(string name, string fire);
503string W_Guide_DPS(string name, string pri, string sec);
504string W_Guide_DPS_bothMultishot(string name, string pri, string sec);
505string W_Guide_DPS_secondaryMultishot(string name, string pri, string sec, string shots, string refire2, bool sec_variable);
506string W_Guide_DPS_primaryMultishot(string name, string pri, string sec, string shots, string refire2);
507string W_Guide_DPS_onlySecondary(string name, string sec);
508string W_Guide_DPS_onlyOneMultishot(string name, string fire, string shots, string refire2);
509string W_Guide_DPS_secondaryMultishotWithCombo(string name, string pri, string sec, string shots, string refire2, string combo, bool sec_variable);
510string W_Guide_DPS_primaryDPS(string name, string pri, string sec);
511#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:24
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:42
virtual void wr_glow()
(BOTH) weapon specific glow
Definition weapon.qh:142
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:53
#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:291
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:85
#define LOG_TRACEF(...)
Definition log.qh:77
#define LOG_INFO(...)
Definition log.qh:65
noref int autocvar_developer
Definition log.qh:96
#define LOG_HELPF(...)
Definition log.qh:86
#define LOG_INFOF(...)
Definition log.qh:66
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:164
#define NEW(cname,...)
Definition oo.qh:117
#define CLASS(...)
Definition oo.qh:145
#define ENDCLASS(cname)
Definition oo.qh:281
#define new_pure(class)
purely logical entities (not linked to the area grid)
Definition oo.qh:67
#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:128
#define REGISTER_REGISTRY(id)
Definition registry.qh:229
#define REGISTRY(id, max)
Declare a new registry.
Definition registry.qh:26
#define REGISTRY_CHECK(id)
Definition registry.qh:175
#define REGISTRY_DEFINE_GET(id, null)
Definition registry.qh:40
#define REGISTRY_GET(id, i)
Definition registry.qh:43
#define REGISTRY_MAX(id)
Definition registry.qh:17
#define setthink(e, f)
vector
Definition self.qh:92
void
Definition self.qh:72
int int int imp
Definition impulse.qc:90
#define STATIC_INIT_LATE(func)
directly after STATIC_INIT
Definition static.qh:37
#define STATIC_INIT(func)
during worldspawn
Definition static.qh:32
#define WEP_HARDCODED_IMPULSES
Definition all.inc:30
string W_FixWeaponOrder_ForceComplete(string order)
Definition all.qc:171
int m_gunalign
Definition all.qh:410
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:419
Weapon Weapon_from_name(string s)
Definition all.qh:144
vector anim_reload
Definition all.qh:425
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:423
vector anim_idle
Definition all.qh:424
Weapon Weapon_from_impulse(int imp)
Definition all.qh:150
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:244
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:402
string autocvar_g_shootfromfixedorigin
Definition all.qh:442
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:351
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:413
entity baseline_target
Definition all.qh:244
const int WEP_FIRST
Definition all.qh:342
entity weaponchild
Definition all.qh:400
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:401
entity muzzle_flash
Definition all.qh:427
WepSet WEPSET_ALL
Definition all.qh:344
string W_FixWeaponOrder(string order, float complete)
Definition all.qc:99
vector anim_fire1
Definition all.qh:422
WFRAME wframe
Definition all.qh:439
#define WEP_IMPULSE_BEGIN
Definition all.qh:350
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:345
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:416
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:272
const int WEP_FLAG_SUPERWEAPON
Definition weapon.qh:260
const int WEP_FLAG_MUTATORBLOCKED
Definition weapon.qh:261
vector WepSet
Definition weapon.qh:14
const int WEP_FLAG_HIDDEN
Definition weapon.qh:258
const int WEP_TYPE_OTHER
Definition weapon.qh:253
const int WEP_FLAG_SPECIALATTACK
Definition weapon.qh:269
float reload_time