]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/common/weapons/weapon/shotgun.qh
Add damage and force falloff to shotgun, machinegun, rifle, vaporizer, okmachinegun...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / weapons / weapon / shotgun.qh
1 #pragma once
2
3 CLASS(Shotgun, Weapon)
4 /* spawnfunc */ ATTRIB(Shotgun, m_canonical_spawnfunc, string, "weapon_shotgun");
5 /* ammotype  */ ATTRIB(Shotgun, ammo_type, Resource, RES_SHELLS);
6 /* impulse   */ ATTRIB(Shotgun, impulse, int, 2);
7 /* flags     */ ATTRIB(Shotgun, spawnflags, int, WEP_FLAG_NORMAL | WEP_FLAG_RELOADABLE | WEP_TYPE_HITSCAN | WEP_TYPE_MELEE_SEC | WEP_FLAG_BLEED);
8 /* rating    */ ATTRIB(Shotgun, bot_pickupbasevalue, float, 6000);
9 /* color     */ ATTRIB(Shotgun, wpcolor, vector, '0.5 0.25 0');
10 /* modelname */ ATTRIB(Shotgun, mdl, string, "shotgun");
11 #ifdef GAMEQC
12 /* model     */ ATTRIB(Shotgun, m_model, Model, MDL_SHOTGUN_ITEM);
13 /* flash mdl */ ATTRIB(Shotgun, m_muzzlemodel, Model, MDL_SHOTGUN_MUZZLEFLASH);
14 /* flash eff */ ATTRIB(Shotgun, m_muzzleeffect, entity, EFFECT_SHOTGUN_MUZZLEFLASH);
15 #endif
16 /* crosshair */ ATTRIB(Shotgun, w_crosshair, string, "gfx/crosshairshotgun");
17 /* crosshair */ ATTRIB(Shotgun, w_crosshair_size, float, 0.65);
18 /* wepimg    */ ATTRIB(Shotgun, model2, string, "weaponshotgun");
19 /* refname   */ ATTRIB(Shotgun, netname, string, "shotgun");
20 /* wepname   */ ATTRIB(Shotgun, m_name, string, _("Shotgun"));
21
22 #define X(BEGIN, P, END, class, prefix) \
23         BEGIN(class) \
24                 P(class, prefix, alt_animtime, float, SEC) \
25                 P(class, prefix, alt_refire, float, SEC) \
26                 P(class, prefix, ammo, float, PRI) \
27                 P(class, prefix, animtime, float, BOTH) \
28                 P(class, prefix, bullets, float, PRI) \
29                 P(class, prefix, damage, float, BOTH) \
30                 P(class, prefix, damagefalloff_forcehalflife, float, PRI) \
31                 P(class, prefix, damagefalloff_halflife, float, PRI) \
32                 P(class, prefix, damagefalloff_maxdist, float, PRI) \
33                 P(class, prefix, damagefalloff_mindist, float, PRI) \
34                 P(class, prefix, force, float, BOTH) \
35                 P(class, prefix, melee_delay, float, SEC) \
36                 P(class, prefix, melee_multihit, float, SEC) \
37                 P(class, prefix, melee_nonplayerdamage, float, SEC) \
38                 P(class, prefix, melee_no_doubleslap, float, SEC) \
39                 P(class, prefix, melee_range, float, SEC) \
40                 P(class, prefix, melee_swing_side, float, SEC) \
41                 P(class, prefix, melee_swing_up, float, SEC) \
42                 P(class, prefix, melee_time, float, SEC) \
43                 P(class, prefix, melee_traces, float, SEC) \
44                 P(class, prefix, refire, float, BOTH) \
45                 P(class, prefix, reload_ammo, float, NONE) \
46         P(class, prefix, reload_time, float, NONE) \
47                 P(class, prefix, secondary, float, NONE) \
48                 P(class, prefix, solidpenetration, float, PRI) \
49                 P(class, prefix, spread, float, PRI) \
50         P(class, prefix, switchdelay_drop, float, NONE) \
51         P(class, prefix, switchdelay_raise, float, NONE) \
52         P(class, prefix, weaponreplace, string,NONE) \
53         P(class, prefix, weaponstartoverride, float, NONE) \
54         P(class, prefix, weaponstart, float, NONE) \
55         P(class, prefix, weaponthrowable, float, NONE) \
56         END()
57     W_PROPS(X, Shotgun, shotgun)
58 #undef X
59
60 ENDCLASS(Shotgun)
61 REGISTER_WEAPON(SHOTGUN, shotgun, NEW(Shotgun));
62