]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/common/weapons/weapon/machinegun.qh
Avoid checking Arc overheat twice
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / weapons / weapon / machinegun.qh
1 #pragma once
2
3 CLASS(MachineGun, Weapon)
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);
7 /* flags     */ ATTRIB(MachineGun, spawnflags, int, WEP_FLAG_NORMAL | WEP_FLAG_RELOADABLE | WEP_TYPE_HITSCAN | WEP_FLAG_PENETRATEWALLS | WEP_FLAG_BLEED);
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)