Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
shotgun.qh
Go to the documentation of this file.
1#pragma once
2
3#ifdef GAMEQC
4MODEL(SHOTGUN_MUZZLEFLASH, "models/uziflash.md3");
5MODEL(SHOTGUN_VIEW, W_Model("h_shotgun.iqm"));
6MODEL(SHOTGUN_WORLD, W_Model("v_shotgun.md3"));
7MODEL(SHOTGUN_ITEM, W_Model("g_shotgun.md3"));
8
9SOUND(SHOTGUN_FIRE, W_Sound("shotgun_fire"));
10SOUND(SHOTGUN_MELEE, W_Sound("shotgun_melee"));
11#endif
12
14#ifdef SVQC
15/* spawnfunc */ ATTRIB(Shotgun, m_canonical_spawnfunc, string, "weapon_shotgun");
16/* rating */ ATTRIB(Shotgun, bot_pickupbasevalue, float, 6000);
17#endif
18/* ammotype */ ATTRIB(Shotgun, ammo_type, Resource, RES_SHELLS);
19/* impulse */ ATTRIB(Shotgun, impulse, int, 2);
21/* color */ ATTRIB(Shotgun, m_color, vector, '0.518 0.608 0.659');
22#ifdef GAMEQC
23/* modelname */ ATTRIB(Shotgun, mdl, string, "shotgun");
24/* model */ ATTRIB(Shotgun, m_model, Model, MDL_SHOTGUN_ITEM);
25/* flash mdl */ ATTRIB(Shotgun, m_muzzlemodel, Model, MDL_SHOTGUN_MUZZLEFLASH);
26/* flash eff */ ATTRIB(Shotgun, m_muzzleeffect, entity, EFFECT_SHOTGUN_MUZZLEFLASH);
27#endif
28#ifdef CSQC
29/* crosshair */ ATTRIB(Shotgun, w_crosshair, string, "gfx/crosshairshotgun");
30/* crosshair */ ATTRIB(Shotgun, w_crosshair_size, float, 0.65);
31#endif
32/* wepimg */ ATTRIB(Shotgun, model2, string, "weaponshotgun");
33/* refname */ ATTRIB(Shotgun, netname, string, "shotgun");
34/* wepname */ ATTRIB(Shotgun, m_name, string, _("Shotgun"));
35
36#define X(BEGIN, P, END, class, prefix) \
37 BEGIN(class) \
38 P(class, prefix, alt_animtime, float, SEC) \
39 P(class, prefix, alt_refire, float, SEC) \
40 P(class, prefix, ammo, float, PRI) \
41 P(class, prefix, animtime, float, BOTH) \
42 P(class, prefix, bullets, float, PRI) \
43 P(class, prefix, damage, float, BOTH) \
44 P(class, prefix, damagefalloff_forcehalflife, float, PRI) \
45 P(class, prefix, damagefalloff_halflife, float, PRI) \
46 P(class, prefix, damagefalloff_maxdist, float, PRI) \
47 P(class, prefix, damagefalloff_mindist, float, PRI) \
48 P(class, prefix, force, float, BOTH) \
49 P(class, prefix, melee_blockedbyfiring, bool, SEC) \
50 P(class, prefix, melee_delay, float, SEC) \
51 P(class, prefix, melee_multihit, float, SEC) \
52 P(class, prefix, melee_nonplayerdamage, float, SEC) \
53 P(class, prefix, melee_no_doubleslap, float, SEC) \
54 P(class, prefix, melee_range, float, SEC) \
55 P(class, prefix, melee_swing_side, float, SEC) \
56 P(class, prefix, melee_swing_up, float, SEC) \
57 P(class, prefix, melee_time, float, SEC) \
58 P(class, prefix, melee_traces, float, SEC) \
59 P(class, prefix, pickup_ammo, float, NONE) \
60 P(class, prefix, refire, float, BOTH) \
61 P(class, prefix, reload_ammo, float, NONE) \
62 P(class, prefix, reload_time, float, NONE) \
63 P(class, prefix, secondary, float, NONE) \
64 P(class, prefix, solidpenetration, float, PRI) \
65 P(class, prefix, spread, float, PRI) \
66 P(class, prefix, spread_pattern, float, PRI) \
67 P(class, prefix, spread_pattern_bias, float, PRI) \
68 P(class, prefix, spread_pattern_scale, float, PRI) \
69 P(class, prefix, switchdelay_drop, float, NONE) \
70 P(class, prefix, switchdelay_raise, float, NONE) \
71 P(class, prefix, weaponreplace, string, NONE) \
72 P(class, prefix, weaponstartoverride, float, NONE) \
73 P(class, prefix, weaponstart, float, NONE) \
74 P(class, prefix, weaponthrowable, float, NONE) \
75 END()
76 W_PROPS(X, Shotgun, shotgun)
77#undef X
78
81
var entity(vector mins, vector maxs,.entity tofield) findbox_tofield_OrFallback
Definition model.qh:3
string w_crosshair
Definition shotgun.qh:29
string model2
Definition shotgun.qh:32
float bot_pickupbasevalue
Definition shotgun.qh:16
vector m_color
Definition shotgun.qh:21
entity m_muzzleeffect
Definition shotgun.qh:26
string m_name
Definition shotgun.qh:34
string m_canonical_spawnfunc
Definition shotgun.qh:15
string netname
Definition shotgun.qh:33
string mdl
Definition shotgun.qh:23
Model m_model
Definition shotgun.qh:24
int impulse
Definition shotgun.qh:19
float w_crosshair_size
Definition shotgun.qh:30
int spawnflags
Definition shotgun.qh:20
Resource ammo_type
Definition shotgun.qh:18
Model m_muzzlemodel
Definition shotgun.qh:25
fields which are explicitly/manually set are marked with "M", fields set automatically are marked wit...
Definition weapon.qh:42
#define X()
string W_Model(string w_mdl)
Definition all.qc:233
#define MODEL(name, path)
Definition all.qh:8
#define NEW(cname,...)
Definition oo.qh:117
#define CLASS(...)
Definition oo.qh:145
#define ENDCLASS(cname)
Definition oo.qh:281
#define ATTRIB(...)
Definition oo.qh:148
vector
Definition self.qh:92
string W_Sound(string w_snd)
Definition all.qc:226
#define SOUND(name, path)
Definition all.qh:30
#define W_PROPS(L, class, prefix)
Definition all.qh:188
#define REGISTER_WEAPON(id, inst)
Definition all.qh:136
const int WEP_FLAG_RELOADABLE
Definition weapon.qh:259
const int WEP_TYPE_HITSCAN
Definition weapon.qh:255
const int WEP_FLAG_BLEED
Definition weapon.qh:267
const int WEP_TYPE_MELEE_SEC
Definition weapon.qh:263
const int WEP_FLAG_NORMAL
Definition weapon.qh:257