]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/common/weapons/weapon/rifle.qh
Merge branch 'master' into terencehill/bot_waypoints
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / weapons / weapon / rifle.qh
1 #pragma once
2
3 CLASS(Rifle, Weapon)
4 /* spawnfunc */ ATTRIB(Rifle, m_canonical_spawnfunc, string, "weapon_rifle");
5 /* ammotype  */ ATTRIB(Rifle, ammo_type, int, RESOURCE_BULLETS);
6 /* impulse   */ ATTRIB(Rifle, impulse, int, 7);
7 /* flags     */ ATTRIB(Rifle, spawnflags, int, WEP_FLAG_MUTATORBLOCKED | WEP_FLAG_RELOADABLE | WEP_TYPE_HITSCAN | WEP_FLAG_PENETRATEWALLS);
8 /* rating    */ ATTRIB(Rifle, bot_pickupbasevalue, float, 7000);
9 /* color     */ ATTRIB(Rifle, wpcolor, vector, '0.5 1 0');
10 /* modelname */ ATTRIB(Rifle, mdl, string, "campingrifle");
11 #ifdef GAMEQC
12 /* model     */ ATTRIB(Rifle, m_model, Model, MDL_RIFLE_ITEM);
13 #endif
14 /* crosshair */ ATTRIB(Rifle, w_crosshair, string, "gfx/crosshairrifle");
15 /* crosshair */ ATTRIB(Rifle, w_crosshair_size, float, 0.6);
16 /* reticle   */ ATTRIB(Rifle, w_reticle, string, "gfx/reticle_nex");
17 /* wepimg    */ ATTRIB(Rifle, model2, string, "weaponrifle");
18 /* refname   */ ATTRIB(Rifle, netname, string, "rifle");
19 /* wepname   */ ATTRIB(Rifle, m_name, string, _("Rifle"));
20
21 #define X(BEGIN, P, END, class, prefix) \
22         BEGIN(class) \
23                 P(class, prefix, ammo, float, BOTH) \
24                 P(class, prefix, animtime, float, BOTH) \
25                 P(class, prefix, bullethail, float, BOTH) \
26                 P(class, prefix, burstcost, float, BOTH) \
27                 P(class, prefix, bursttime, float, NONE) \
28                 P(class, prefix, damage, float, BOTH) \
29                 P(class, prefix, force, float, BOTH) \
30                 P(class, prefix, refire, float, BOTH) \
31                 P(class, prefix, reload, float, SEC) \
32                 P(class, prefix, reload_ammo, float, NONE) \
33         P(class, prefix, reload_time, float, NONE) \
34                 P(class, prefix, secondary, float, NONE) \
35                 P(class, prefix, shots, float, BOTH) \
36                 P(class, prefix, solidpenetration, float, BOTH) \
37                 P(class, prefix, spread, float, BOTH) \
38         P(class, prefix, switchdelay_drop, float, NONE) \
39         P(class, prefix, switchdelay_raise, float, NONE) \
40                 P(class, prefix, tracer, float, BOTH) \
41         P(class, prefix, weaponreplace, string, NONE) \
42         P(class, prefix, weaponstartoverride, float, NONE) \
43         P(class, prefix, weaponstart, float, NONE) \
44         P(class, prefix, weaponthrowable, float, NONE) \
45         END()
46     W_PROPS(X, Rifle, rifle)
47 #undef X
48 ENDCLASS(Rifle)
49 REGISTER_WEAPON(RIFLE, rifle, NEW(Rifle));
50
51 SPAWNFUNC_WEAPON(weapon_rifle, WEP_RIFLE)
52 SPAWNFUNC_WEAPON(weapon_campingrifle, WEP_RIFLE)
53 SPAWNFUNC_WEAPON(weapon_sniperrifle, WEP_RIFLE)
54
55 #ifdef SVQC
56 .float rifle_accumulator;
57 #endif