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.
31{
32 FOREACH(Weapons, true,
33 {
34 if ((it.spawnflags & WEP_FLAG_SPECIALATTACK) && !(it.spawnflags & WEP_FLAG_HIDDEN))
35 error(sprintf("Special attack \"%s\" without WEP_FLAG_HIDDEN flag set.", it.m_name));
36 it.m_pickup = NEW(WeaponPickup, it);
37 });
38}
39
40#ifdef SVQC
41#include <server/bot/api.qh>
42#endif
43
44.WepSet m_wepset;
45#define WEPSET(id) (WEP_##id.m_wepset)
46#define WepSet_FromWeapon(it) ((it).m_wepset)
48
50
51#define DEFAULT_FILENAME "weapons_dump.cfg"
52// NOTE: dumpeffectinfo, dumpnotifs, dumpturrets and dumpweapons use similar code
53GENERIC_COMMAND(dumpweapons, "Dump all weapons into " DEFAULT_FILENAME, false) // WEAPONTODO: make this work with other progs than just server
54{
55 switch(request)
56 {
58 {
59 #ifdef SVQC
60 wep_config_file = -1;
62 string filename = argv(1);
63
64 if(filename == "")
65 {
66 filename = DEFAULT_FILENAME;
68 }
69 else if(filename == "-")
70 {
71 filename = DEFAULT_FILENAME;
73 }
74 wep_config_file = fopen(filename, FILE_WRITE);
75
76 if(wep_config_file >= 0)
77 {
79 LOG_INFOF("Dumping weapons... File located in ^2data/data/%s^7.", filename);
81 wep_config_file = -1;
83 }
84 else
85 {
86 LOG_INFOF("^1Error: ^7Could not open file '%s'!", filename);
87 }
88 #else
89 LOG_INFO("Weapons dump command only works with sv_cmd.");
90 #endif
91 return;
92 }
93
94 default:
96 {
97 LOG_HELP("Usage:^3 ", GetProgramCommandPrefix(), " dumpweapons [<filename>]");
98 LOG_HELPF(" Where <filename> is the file to write (default is %s),", DEFAULT_FILENAME);
99 LOG_HELP(" if supplied with '-' output to console as well as default,");
100 LOG_HELP(" if left blank, it will only write to default.");
101 return;
102 }
103 }
104}
105#undef DEFAULT_FILENAME
106
107#ifdef SVQC
108entity W_PROP_reloader;
110.void(Weapon this, int) wr_net;
111
112void W_PROP_reload(int chan, entity to)
113{
114 W_PROP_reloader.nextthink = time + autocvar_w_prop_interval;
115 msg_entity = to;
116 FOREACH(Weapons, true, {
117 it.wr_update(it);
118 void(Weapon, int) f = it.wr_net;
119 if (f) 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
179#define W_PROPS(L, class, prefix) \
180 L(W_PROP_BEGIN, W_PROP, W_PROP_END, class, prefix) \
181 L(W_CONFIG_BEGIN, W_CONFIG, W_CONFIG_END, class, prefix) \
182 L(W_UPDATE_BEGIN, W_UPDATE, W_UPDATE_END, class, prefix) \
183 L(W_NET_BEGIN, W_NET, W_NET_END, class, prefix) \
184 /**/ \
185
186
187 #define W_PROP(class, wepname, fld, T, m) W_PROP_##m(class, fld, T, wepname)
188 #define W_PROP_NONE(class, fld, T, wepname) _W_PROP(class, fld, T, wepname)
189 #define W_PROP_PRI(class, fld, T, wepname) _W_PROP(class, primary_##fld, T, wepname)
190 #define W_PROP_SEC(class, fld, T, wepname) _W_PROP(class, secondary_##fld, T, wepname)
191 #define W_PROP_BOTH(class, fld, T, wepname) \
192 W_PROP_PRI(class, fld, T, wepname) \
193 W_PROP_SEC(class, fld, T, wepname)
194 #define W_PROP_BEGIN(class)
195 #if defined(SVQC)
196 #define _W_PROP(class, fld, T, wepname) \
197 /* static */ T _W_PROP_CVAR(wepname, fld); \
198 ATTRIB(class, wepvar_##fld, T, _W_PROP_CVAR(wepname, fld));
199 #define _W_PROP_CVAR(wepname, fld) autocvar_g_balance_##wepname##_##fld
200 #elif defined(CSQC)
201 #define _W_PROP(class, fld, T, wepname) ATTRIB(class, wepvar_##fld, T);
202 #else
203 #define _W_PROP(class, fld, T, wepname)
204 #endif
205 #define W_PROP_END()
206
207
208
209 #define W_CONFIG(class, wepname, fld, T, m) W_CONFIG_##m(class, fld, T, wepname)
210 #define W_CONFIG_NONE(class, fld, T, wepname) _W_CONFIG(class, fld, T, wepname)
211 #define W_CONFIG_PRI(class, fld, T, wepname) _W_CONFIG(class, primary_##fld, T, wepname)
212 #define W_CONFIG_SEC(class, fld, T, wepname) _W_CONFIG(class, secondary_##fld, T, wepname)
213 #define W_CONFIG_BOTH(class, fld, T, wepname) \
214 W_CONFIG_PRI(class, fld, T, wepname) \
215 W_CONFIG_SEC(class, fld, T, wepname)
216 #ifdef SVQC
217 #define W_CONFIG_BEGIN(class) METHOD(class, wr_config, void(class this)) {
218 #define _W_CONFIG(class, fld, T, wepname) if (#wepname == this.netname) WEP_CONFIG_WRITE_CVARS(wepname, fld, T);
219 #define W_CONFIG_END() }
220 #else
221 #define W_CONFIG_BEGIN(class)
222 #define _W_CONFIG(class, fld, T, wepname)
223 #define W_CONFIG_END()
224 #endif
225
226
227 #define W_UPDATE(class, wepname, fld, T, m) W_UPDATE_##m(class, fld, T, wepname)
228 #define W_UPDATE_NONE(class, fld, T, wepname) _W_UPDATE(class, fld, T, wepname)
229 #define W_UPDATE_PRI(class, fld, T, wepname) _W_UPDATE(class, primary_##fld, T, wepname)
230 #define W_UPDATE_SEC(class, fld, T, wepname) _W_UPDATE(class, secondary_##fld, T, wepname)
231 #define W_UPDATE_BOTH(class, fld, T, wepname) \
232 W_UPDATE_PRI(class, fld, T, wepname) \
233 W_UPDATE_SEC(class, fld, T, wepname)
234 #ifdef GAMEQC
236 #define W_UPDATE_BEGIN(class) \
237 METHOD(class, wr_update, void(class this)) \
238 { \
239 noref entity b = this.baseline; \
240 if (!b) \
241 { \
242 b = this.baseline = new_pure(baseline); \
243 b.baseline_target = this; \
244 }
245 #ifdef SVQC
246 #define _W_UPDATE(class, fld, T, wepname) \
247 { \
248 T it = _W_PROP_CVAR(wepname, fld); \
249 b.wepvar_##fld = this.wepvar_##fld; \
250 this.wepvar_##fld = it; \
251 }
252 #else
253 #define _W_UPDATE(class, fld, T, wepname)
254 #endif
255 #define W_UPDATE_END() }
256 #else
257 #define W_UPDATE_BEGIN(class)
258 #define _W_UPDATE(class, fld, T, wepname)
259 #define W_UPDATE_END()
260 #endif
261
262
263 #define W_NET(class, wepname, fld, T, m) W_NET_##m(class, fld, T, wepname)
264 #define W_NET_NONE(class, fld, T, wepname) _W_NET(class, fld, T, wepname)
265 #define W_NET_PRI(class, fld, T, wepname) _W_NET(class, primary_##fld, T, wepname)
266 #define W_NET_SEC(class, fld, T, wepname) _W_NET(class, secondary_##fld, T, wepname)
267 #define W_NET_BOTH(class, fld, T, wepname) \
268 W_NET_PRI(class, fld, T, wepname) \
269 W_NET_SEC(class, fld, T, wepname)
270 #if defined(CSQC)
271 REGISTER_NET_TEMP(WeaponUpdate)
272 #define W_NET_BEGIN(class) METHOD(class, wr_net, void(class this, int i)) { int n = 0;
273 #define _W_NET(class, fld, T, wepname) \
274 { \
275 if (++n == i) this.wepvar_##fld = Read_##T(); \
276 }
277 .void(Weapon this, int i) wr_net;
278 NET_HANDLE(WeaponUpdate, bool isnew)
279 {
281 for (int i; (i = ReadByte()); )
282 {
283 w.wr_net(w, i);
284 }
285 return true;
286 }
287 #define W_NET_END() }
288 #elif defined(SVQC)
289 REGISTER_NET_TEMP(WeaponUpdate)
290 #define W_NET_BEGIN(class) \
291 METHOD(class, wr_net, void(class this, int chan)) \
292 { \
293 bool commit = false; \
294 int i = 0;
295 #define _W_NET(class, fld, T, wepname) \
296 { \
297 ++i; \
298 T it = this.wepvar_##fld; \
299 if (chan == MSG_ONE || it != this.baseline.wepvar_##fld) \
300 { \
301 if (!commit) \
302 { \
303 commit = true; \
304 WriteHeader(chan, WeaponUpdate); \
305 WriteByte(chan, this.m_id); \
306 } \
307 WriteByte(chan, i); Write_##T(chan, it); \
308 } \
309 }
310 #define W_NET_END() if (commit) WriteByte(chan, 0); }
311 #else
312 #define W_NET_BEGIN(class)
313 #define _W_NET(class, fld, T, wepname)
314 #define W_NET_END()
315 #endif
316
317
318
319// read cvars from weapon settings
320// cvars are created as such: g_balance_wepname_name
321#define WEP_CVAR(wep, name) (wep.wepvar_##name)
322#define WEP_CVAR_PRI(wep, name) WEP_CVAR(wep, primary_##name)
323#define WEP_CVAR_SEC(wep, name) WEP_CVAR(wep, secondary_##name)
324#define WEP_CVAR_BOTH(wep, isprimary, name) ((isprimary) ? WEP_CVAR_PRI(wep, name) : WEP_CVAR_SEC(wep, name))
325
326const int WEP_FIRST = 1;
327#define WEP_LAST (REGISTRY_COUNT(Weapons) - 1)
330
331#include "all.inc"
332
333// TODO: invert after changes have been made to the hardcoded weapon impulses. Will require moving 'best weapon' impulses
334#define WEP_IMPULSE_BEGIN 230
335#define WEP_IMPULSE_END bound(WEP_IMPULSE_BEGIN, WEP_IMPULSE_BEGIN + (REGISTRY_COUNT(Weapons) - 1) - 1, 253)
336
339
340STATIC_INIT(register_weapons_done)
341{
342 string inaccessible = "";
344 FOREACH(Weapons, true, {
345 WepSet set = it.m_wepset = _WepSet_FromWeapon(it.m_id = i);
346 WEPSET_ALL |= set;
347 if (it.spawnflags & WEP_FLAG_SUPERWEAPON) WEPSET_SUPERWEAPONS |= set;
348 if (it == WEP_Null) continue;
349 if (it.spawnflags & WEP_FLAG_SPECIALATTACK) continue;
350 // TODO: this exists to filter out the Ball Stealer, otherwise we run out of impulses
351 if ((it.spawnflags & WEP_FLAG_MUTATORBLOCKED) && (it.spawnflags & WEP_TYPE_OTHER)) continue;
352
353 it.m_unique_impulse = imp;
354 if (imp <= WEP_IMPULSE_END)
355 localcmd(sprintf("alias weapon_%s \"impulse %d\"\n", it.netname, imp));
356 else
357 inaccessible = strcat(inaccessible, "\n", it.netname);
358 ++imp;
359 });
360 if (inaccessible != "" && autocvar_developer > 0) LOG_TRACEF("Impulse limit exceeded, weapon(s) will not be directly accessible: %s", inaccessible);
361 #ifdef CSQC
362 FOREACH(Weapons, true, it.wr_init(it));
363 #endif
364 #ifdef MENUQC
365 FOREACH(Weapons, (it.spawnflags & WEP_FLAG_HIDDEN) && (it.spawnflags & WEP_FLAG_SPECIALATTACK), it.m_hidden = true);
366 #endif
367 weaponorder_byid = "";
368 for (int i = REGISTRY_MAX(Weapons) - 1; i >= 1; --i)
369 if (REGISTRY_GET(Weapons, i))
372}
373
374#ifdef GAMEQC
375
379{
380 vector g;
381 if (!(g = wep.wr_glow(wep, c, wepent))) g = colormapPaletteColor(c & 0x0F, true);
382 return g;
383}
384
386
387//.int weapon; // current weapon
388.string weaponname; // name of .weapon
389
390#ifdef SVQC
391.vector spawnorigin; // for casings
392#endif
393
394.vector movedir_aligned; // shot origin based on weapon alignment (unaffected by shootfromeye)
395
396// weapon animation vectors:
399.vector anim_idle;
401
403
404// static frame globals
405
406ENUMCLASS(WFRAME)
407CASE(WFRAME, DONTCHANGE)
408CASE(WFRAME, FIRE1)
409CASE(WFRAME, FIRE2)
410CASE(WFRAME, IDLE)
411CASE(WFRAME, RELOAD)
412ENUMCLASS_END(WFRAME)
413
414.WFRAME wframe;
415
416#ifdef SVQC
418 #define G_SHOOTFROMFIXEDORIGIN autocvar_g_shootfromfixedorigin
419#elif defined(CSQC)
420 string autocvar_cl_shootfromfixedorigin;
421 #define G_SHOOTFROMFIXEDORIGIN autocvar_cl_shootfromfixedorigin
422#endif
423
424vector shotorg_adjust(vector vecs, bool y_is_right, bool visual, int algn);
425void CL_WeaponEntity_SetModel(entity this, string name, bool _anim);
426
427REPLICATE_INIT(int, cvar_cl_gunalign);
428REPLICATE_INIT(bool, cvar_cl_weapon_switch_reload);
429REPLICATE_INIT(bool, cvar_cl_weapon_switch_fallback_to_impulse);
430REPLICATE_INIT(int, cvar_cl_weaponimpulsemode);
431
432REPLICATE_INIT(string, cvar_cl_weaponpriority);
433REPLICATE_INIT(string, cvar_cl_weaponpriorities[10]);
434
435#ifdef CSQC
436REPLICATE_INIT(bool, cvar_cl_accuracy_data_share);
437REPLICATE_INIT(bool, cvar_cl_accuracy_data_receive);
438#endif
439
440#ifdef SVQC
441void wframe_send(entity actor, entity weaponentity, int wepframe, float attackrate, bool restartanim);
442
443void W_MuzzleFlash(Weapon thiswep, entity actor, .entity weaponentity, vector shotorg, vector shotdir);
444
446string W_FixWeaponOrder_AllowIncomplete(entity this, string order);
447#endif
448
449#endif
450
451// functions:
452string W_FixWeaponOrder(string order, float complete);
453string W_NameWeaponOrder(string order);
454string W_NumberWeaponOrder(string order);
455string W_FixWeaponOrder_BuildImpulseList(string o);
456string W_FixWeaponOrder_AllowIncomplete(entity this, string order);
457string W_FixWeaponOrder_ForceComplete(string order);
458WepSet W_RandomWeapons(entity e, WepSet remaining, int n);
459
460entity GetAmmoItem(Resource ammotype);
461entity GetAmmoResource(Ammo ammotype);
462
463#ifdef CSQC
464int GetAmmoStat(Resource ammotype);
465#endif
466
467string W_Sound(string w_snd);
468string W_Model(string w_mdl);
469
470
471#ifdef MENUQC
472string W_Guide_Keybinds(Weapon wep);
473
474string W_Guide_DPS_onlyOne_unnamed(string name);
475string W_Guide_DPS_onlyOne(string name, string fire);
477string W_Guide_DPS_onlyOne_andDirectHit(string name, string fire);
478string W_Guide_DPS(string name, string pri, string sec);
479string W_Guide_DPS_bothMultishot(string name, string pri, string sec);
480string W_Guide_DPS_secondaryMultishot(string name, string pri, string sec, string shots, string refire2, bool sec_variable);
481string W_Guide_DPS_primaryMultishot(string name, string pri, string sec, string shots, string refire2);
482string W_Guide_DPS_onlySecondary(string name, string sec);
483string W_Guide_DPS_onlyOneMultishot(string name, string fire, string shots, string refire2);
484string W_Guide_DPS_secondaryMultishotWithCombo(string name, string pri, string sec, string shots, string refire2, string combo, bool sec_variable);
485string W_Guide_DPS_primaryDPS(string name, string pri, string sec);
486#endif
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:44
virtual void wr_glow()
(BOTH) weapon specific glow
Definition weapon.qh:125
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:52
#define FOREACH(list, cond, body)
Definition iter.qh:19
vector dest
Definition jumppads.qh:54
#define NET_HANDLE(id, param)
Definition net.qh:15
int ReadByte()
#define REGISTER_NET_TEMP(id)
Definition net.qh:28
#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:166
int m_gunalign
Definition all.qh:385
string W_FixWeaponOrder_AllowIncomplete(entity this, string order)
Definition all.qc:161
WepSet m_wepset
Definition all.qh:44
vector movedir_aligned
Definition all.qh:394
Weapon Weapon_from_name(string s)
Definition all.qh:144
vector anim_reload
Definition all.qh:400
void wframe_send(entity actor, entity weaponentity, int wepframe, float attackrate, bool restartanim)
Definition all.qc:588
void W_PROP_reload(int chan, entity to)
Definition all.qh:112
string W_Model(string w_mdl)
Definition all.qc:232
string W_Guide_Keybinds(Weapon wep)
Definition all.qc:836
float autocvar_w_prop_interval
Definition all.qh:109
void WriteWepSet(float dest, WepSet w)
Definition all.qc:71
vector anim_fire2
Definition all.qh:398
vector anim_idle
Definition all.qh:399
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:985
void CL_WeaponEntity_SetModel(entity this, string name, bool _anim)
supported formats:
Definition all.qc:347
WepSet WepSet_GetFromStat_InMap()
Definition all.qc:83
string W_Guide_DPS_secondaryMultishot(string name, string pri, string sec, string shots, string refire2, bool sec_variable)
Definition all.qc:967
entity baseline
Definition all.qh:235
int GetAmmoStat(Resource ammotype)
Definition all.qc:210
entity GetAmmoResource(Ammo ammotype)
Definition all.qc:199
vector weaponentity_glowmod(Weapon wep, int c, entity wepent)
Definition all.qh:378
string autocvar_g_shootfromfixedorigin
Definition all.qh:417
string W_NumberWeaponOrder(string order)
Definition all.qc:120
string W_FixWeaponOrder_BuildImpulseList(string o)
Definition all.qc:146
string W_Guide_DPS(string name, string pri, string sec)
Definition all.qc:930
string W_Sound(string w_snd)
Definition all.qc:225
#define WEP_IMPULSE_END
Definition all.qh:335
string W_Guide_DPS_bothMultishot(string name, string pri, string sec)
Definition all.qc:944
string W_NameWeaponOrder(string order)
Definition all.qc:110
string W_Guide_DPS_onlySecondary(string name, string sec)
Definition all.qc:958
string weaponname
Definition all.qh:388
entity baseline_target
Definition all.qh:235
const int WEP_FIRST
Definition all.qh:326
entity weaponchild
Definition all.qh:376
string W_Guide_DPS_onlyOne_andDirectHit(string name, string fire)
Definition all.qc:922
void W_MuzzleFlash(Weapon thiswep, entity actor,.entity weaponentity, vector shotorg, vector shotdir)
Definition all.qc:728
string W_FixWeaponOrder_ForceComplete_AndBuildImpulseList(entity this, string wo)
Definition all.qc:802
string W_Guide_DPS_secondaryMultishotWithCombo(string name, string pri, string sec, string shots, string refire2, string combo, bool sec_variable)
Definition all.qc:1014
WepSet WepSet_GetFromStat()
Definition all.qc:79
string W_Guide_DPS_onlyOneMultishot(string name, string fire, string shots, string refire2)
Definition all.qc:1001
string W_Guide_DPS_onlyOne_unnamed(string name)
Definition all.qc:913
entity exteriorweaponentity
Definition all.qh:377
entity muzzle_flash
Definition all.qh:402
WepSet WEPSET_ALL
Definition all.qh:328
string W_FixWeaponOrder(string order, float complete)
Definition all.qc:95
vector anim_fire1
Definition all.qh:397
WFRAME wframe
Definition all.qh:414
#define WEP_IMPULSE_BEGIN
Definition all.qh:334
string W_Guide_DPS_onlyOne(string name, string fire)
Definition all.qc:926
#define REGISTER_WEAPON(id, inst)
Definition all.qh:136
WepSet WEPSET_SUPERWEAPONS
Definition all.qh:329
string W_Guide_DPS_primaryDPS(string name, string pri, string sec)
Definition all.qc:1040
entity GetAmmoItem(Resource ammotype)
Definition all.qc:189
void W_PROP_think(entity this)
Definition all.qh:123
WepSet ReadWepSet()
Definition all.qc:87
vector shotorg_adjust(vector vecs, bool y_is_right, bool visual, int algn)
Definition all.qc:262
int m_unique_impulse
Definition all.qh:49
vector spawnorigin
Definition all.qh:391
string W_Guide_DPS_onlyOne_unnamed_andDirectHit(string name)
Definition all.qc:901
WepSet _WepSet_FromWeapon(int i)
Definition all.qc:53
WepSet W_RandomWeapons(entity e, WepSet remaining, int n)
Definition all.qc:172
void Dump_Weapon_Settings()
Definition config.qc:32
bool wep_config_alsoprint
Definition config.qh:10
int wep_config_file
Definition config.qh:9
string weaponorder_byid
Definition weapon.qh:230
const int WEP_FLAG_SUPERWEAPON
Definition weapon.qh:218
const int WEP_FLAG_MUTATORBLOCKED
Definition weapon.qh:219
vector WepSet
Definition weapon.qh:14
const int WEP_FLAG_HIDDEN
Definition weapon.qh:216
const int WEP_TYPE_OTHER
Definition weapon.qh:211
const int WEP_FLAG_SPECIALATTACK
Definition weapon.qh:227
float reload_time