Xonotic
rifle.qh
Go to the documentation of this file.
1 #pragma once
2 
4 /* spawnfunc */ ATTRIB(Rifle, m_canonical_spawnfunc, string, "weapon_rifle");
5 /* ammotype */ ATTRIB(Rifle, ammo_type, Resource, RES_BULLETS);
6 /* impulse */ ATTRIB(Rifle, impulse, int, 7);
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 /* flash mdl */ ATTRIB(Rifle, m_muzzlemodel, Model, MDL_Null);
14 /* flash eff */ ATTRIB(Rifle, m_muzzleeffect, entity, EFFECT_RIFLE_MUZZLEFLASH);
15 #endif
16 /* crosshair */ ATTRIB(Rifle, w_crosshair, string, "gfx/crosshairrifle");
17 /* crosshair */ ATTRIB(Rifle, w_crosshair_size, float, 0.6);
18 /* reticle */ ATTRIB(Rifle, w_reticle, string, "gfx/reticle_nex");
19 /* wepimg */ ATTRIB(Rifle, model2, string, "weaponrifle");
20 /* refname */ ATTRIB(Rifle, netname, string, "rifle");
21 /* wepname */ ATTRIB(Rifle, m_name, string, _("Rifle"));
22 
23 #define X(BEGIN, P, END, class, prefix) \
24  BEGIN(class) \
25  P(class, prefix, ammo, float, BOTH) \
26  P(class, prefix, animtime, float, BOTH) \
27  P(class, prefix, bullethail, float, BOTH) \
28  P(class, prefix, burstcost, float, BOTH) \
29  P(class, prefix, bursttime, float, NONE) \
30  P(class, prefix, damage, float, BOTH) \
31  P(class, prefix, force, float, BOTH) \
32  P(class, prefix, headshot_multiplier, float, BOTH) \
33  P(class, prefix, refire, float, BOTH) \
34  P(class, prefix, reload, float, SEC) \
35  P(class, prefix, reload_ammo, float, NONE) \
36  P(class, prefix, reload_time, float, NONE) \
37  P(class, prefix, secondary, float, NONE) \
38  P(class, prefix, shots, float, BOTH) \
39  P(class, prefix, solidpenetration, float, BOTH) \
40  P(class, prefix, spread, float, BOTH) \
41  P(class, prefix, switchdelay_drop, float, NONE) \
42  P(class, prefix, switchdelay_raise, float, NONE) \
43  P(class, prefix, tracer, float, BOTH) \
44  P(class, prefix, weaponreplace, string, NONE) \
45  P(class, prefix, weaponstartoverride, float, NONE) \
46  P(class, prefix, weaponstart, float, NONE) \
47  P(class, prefix, weaponthrowable, float, NONE) \
48  END()
49  W_PROPS(X, Rifle, rifle)
50 #undef X
51 ENDCLASS(Rifle)
52 REGISTER_WEAPON(RIFLE, rifle, NEW(Rifle));
53 
54 SPAWNFUNC_WEAPON(weapon_rifle, WEP_RIFLE)
55 SPAWNFUNC_WEAPON(weapon_campingrifle, WEP_RIFLE)
56 SPAWNFUNC_WEAPON(weapon_sniperrifle, WEP_RIFLE)
57 
58 #ifdef SVQC
59 .float rifle_accumulator;
60 #endif
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
Definition: rifle.qh:3
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
REGISTER_WEAPON(RIFLE, rifle, NEW(Rifle))
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
const int WEP_FLAG_MUTATORBLOCKED
Definition: weapon.qh:203
#define X(BEGIN, P, END, class, prefix)
Definition: rifle.qh:23
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
string m_name
Definition: scores.qh:135