Xonotic
machinegun.qh
Go to the documentation of this file.
1 #pragma once
2 
4 /* spawnfunc */ ATTRIB(MachineGun, m_canonical_spawnfunc, string, "weapon_machinegun");
5 /* ammotype */ ATTRIB(MachineGun, ammo_type, Resource, RES_BULLETS);
6 /* impulse */ ATTRIB(MachineGun, impulse, int, 3);
8 /* rating */ ATTRIB(MachineGun, bot_pickupbasevalue, float, 7000);
9 /* color */ ATTRIB(MachineGun, wpcolor, vector, '1 1 0');
10 /* modelname */ ATTRIB(MachineGun, mdl, string, "uzi");
11 #ifdef GAMEQC
12 /* model */ ATTRIB(MachineGun, m_model, Model, MDL_MACHINEGUN_ITEM);
13 /* flash mdl */ ATTRIB(MachineGun, m_muzzlemodel, Model, MDL_MACHINEGUN_MUZZLEFLASH);
14 /* flash eff */ ATTRIB(MachineGun, m_muzzleeffect, entity, EFFECT_MACHINEGUN_MUZZLEFLASH);
15 #endif
16 /* crosshair */ ATTRIB(MachineGun, w_crosshair, string, "gfx/crosshairuzi");
17 /* crosshair */ ATTRIB(MachineGun, w_crosshair_size, float, 0.6);
18 /* wepimg */ ATTRIB(MachineGun, model2, string, "weaponuzi");
19 /* refname */ ATTRIB(MachineGun, netname, string, "machinegun");
20 /* wepname */ ATTRIB(MachineGun, m_name, string, _("MachineGun"));
21 
22 #define X(BEGIN, P, END, class, prefix) \
23  BEGIN(class) \
24  P(class, prefix, burst, float, NONE) \
25  P(class, prefix, burst_ammo, float, NONE) \
26  P(class, prefix, burst_animtime, float, NONE) \
27  P(class, prefix, burst_refire2, float, NONE) \
28  P(class, prefix, burst_refire, float, NONE) \
29  P(class, prefix, burst_spread, float, NONE) \
30  P(class, prefix, first, float, NONE) \
31  P(class, prefix, first_ammo, float, NONE) \
32  P(class, prefix, first_damage, float, NONE) \
33  P(class, prefix, first_force, float, NONE) \
34  P(class, prefix, first_refire, float, NONE) \
35  P(class, prefix, first_spread, float, NONE) \
36  P(class, prefix, mode, float, NONE) \
37  P(class, prefix, reload_ammo, float, NONE) \
38  P(class, prefix, reload_time, float, NONE) \
39  P(class, prefix, solidpenetration, float, NONE) \
40  P(class, prefix, spread_add, float, NONE) \
41  P(class, prefix, spread_max, float, NONE) \
42  P(class, prefix, spread_min, float, NONE) \
43  P(class, prefix, sustained_ammo, float, NONE) \
44  P(class, prefix, sustained_damage, float, NONE) \
45  P(class, prefix, sustained_force, float, NONE) \
46  P(class, prefix, sustained_refire, float, NONE) \
47  P(class, prefix, sustained_spread, float, NONE) \
48  P(class, prefix, switchdelay_drop, float, NONE) \
49  P(class, prefix, switchdelay_raise, float, NONE) \
50  P(class, prefix, weaponreplace, string,NONE) \
51  P(class, prefix, weaponstartoverride, float, NONE) \
52  P(class, prefix, weaponstart, float, NONE) \
53  P(class, prefix, weaponthrowable, float, NONE) \
54  END()
55  W_PROPS(X, MachineGun, machinegun)
56 #undef X
57 
58 ENDCLASS(MachineGun)
59 REGISTER_WEAPON(MACHINEGUN, machinegun, NEW(MachineGun));
60 
61 SPAWNFUNC_WEAPON(weapon_machinegun, WEP_MACHINEGUN)
62 SPAWNFUNC_WEAPON(weapon_uzi, WEP_MACHINEGUN)
const int WEP_FLAG_PENETRATEWALLS
Definition: weapon.qh:208
const int WEP_FLAG_RELOADABLE
Definition: weapon.qh:201
#define NEW(cname,...)
Definition: oo.qh:105
CLASS(Object) Object
Definition: oo.qh:318
entity() spawn
string netname
Definition: powerups.qc:20
float bot_pickupbasevalue
Definition: bot.qh:66
float impulse
Definition: progsdefs.qc:158
float spawnflags
Definition: progsdefs.qc:191
#define ATTRIB(...)
Definition: oo.qh:136
Definition: model.qh:3
vector(float skel, float bonenum) _skel_get_boneabs_hidden
#define SPAWNFUNC_WEAPON(name, weapon)
Definition: weapon.qh:143
#define ENDCLASS(cname)
Definition: oo.qh:269
REGISTER_WEAPON(MACHINEGUN, machinegun, NEW(MachineGun))
const int WEP_FLAG_NORMAL
Definition: weapon.qh:199
const int WEP_FLAG_BLEED
Definition: weapon.qh:209
fields which are explicitly/manually set are marked with "M", fields set automatically are marked wit...
Definition: weapon.qh:41
const int WEP_TYPE_HITSCAN
Definition: weapon.qh:197
#define W_PROPS(L, class, prefix)
Definition: all.qh:163
#define X(BEGIN, P, END, class, prefix)
Definition: machinegun.qh:22
string m_name
Definition: scores.qh:135