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/* spawnfunc */ ATTRIB(Shotgun, m_canonical_spawnfunc, string, "weapon_shotgun");
15/* ammotype */ ATTRIB(Shotgun, ammo_type, Resource, RES_SHELLS);
16/* impulse */ ATTRIB(Shotgun, impulse, int, 2);
18/* rating */ ATTRIB(Shotgun, bot_pickupbasevalue, float, 6000);
19/* color */ ATTRIB(Shotgun, m_color, vector, '0.518 0.608 0.659');
20/* modelname */ ATTRIB(Shotgun, mdl, string, "shotgun");
21#ifdef GAMEQC
22/* model */ ATTRIB(Shotgun, m_model, Model, MDL_SHOTGUN_ITEM);
23/* flash mdl */ ATTRIB(Shotgun, m_muzzlemodel, Model, MDL_SHOTGUN_MUZZLEFLASH);
24/* flash eff */ ATTRIB(Shotgun, m_muzzleeffect, entity, EFFECT_SHOTGUN_MUZZLEFLASH);
25#endif
26/* crosshair */ ATTRIB(Shotgun, w_crosshair, string, "gfx/crosshairshotgun");
27/* crosshair */ ATTRIB(Shotgun, w_crosshair_size, float, 0.65);
28/* wepimg */ ATTRIB(Shotgun, model2, string, "weaponshotgun");
29/* refname */ ATTRIB(Shotgun, netname, string, "shotgun");
30/* wepname */ ATTRIB(Shotgun, m_name, string, _("Shotgun"));
31
32#define X(BEGIN, P, END, class, prefix) \
33 BEGIN(class) \
34 P(class, prefix, alt_animtime, float, SEC) \
35 P(class, prefix, alt_refire, float, SEC) \
36 P(class, prefix, ammo, float, PRI) \
37 P(class, prefix, animtime, float, BOTH) \
38 P(class, prefix, bullets, float, PRI) \
39 P(class, prefix, damage, float, BOTH) \
40 P(class, prefix, damagefalloff_forcehalflife, float, PRI) \
41 P(class, prefix, damagefalloff_halflife, float, PRI) \
42 P(class, prefix, damagefalloff_maxdist, float, PRI) \
43 P(class, prefix, damagefalloff_mindist, float, PRI) \
44 P(class, prefix, force, float, BOTH) \
45 P(class, prefix, melee_blockedbyfiring, bool, SEC) \
46 P(class, prefix, melee_delay, float, SEC) \
47 P(class, prefix, melee_multihit, float, SEC) \
48 P(class, prefix, melee_nonplayerdamage, float, SEC) \
49 P(class, prefix, melee_no_doubleslap, float, SEC) \
50 P(class, prefix, melee_range, float, SEC) \
51 P(class, prefix, melee_swing_side, float, SEC) \
52 P(class, prefix, melee_swing_up, float, SEC) \
53 P(class, prefix, melee_time, float, SEC) \
54 P(class, prefix, melee_traces, float, SEC) \
55 P(class, prefix, pickup_ammo, float, NONE) \
56 P(class, prefix, refire, float, BOTH) \
57 P(class, prefix, reload_ammo, float, NONE) \
58 P(class, prefix, reload_time, float, NONE) \
59 P(class, prefix, secondary, float, NONE) \
60 P(class, prefix, solidpenetration, float, PRI) \
61 P(class, prefix, spread, float, PRI) \
62 P(class, prefix, spread_pattern, float, PRI) \
63 P(class, prefix, spread_pattern_bias, float, PRI) \
64 P(class, prefix, spread_pattern_scale, float, PRI) \
65 P(class, prefix, switchdelay_drop, float, NONE) \
66 P(class, prefix, switchdelay_raise, float, NONE) \
67 P(class, prefix, weaponreplace, string,NONE) \
68 P(class, prefix, weaponstartoverride, float, NONE) \
69 P(class, prefix, weaponstart, float, NONE) \
70 P(class, prefix, weaponthrowable, float, NONE) \
71 END()
72 W_PROPS(X, Shotgun, shotgun)
73#undef X
74
77
var entity(vector mins, vector maxs,.entity tofield) findbox_tofield_OrFallback
Definition model.qh:3
string w_crosshair
Definition shotgun.qh:26
string model2
Definition shotgun.qh:28
float bot_pickupbasevalue
Definition shotgun.qh:18
vector m_color
Definition shotgun.qh:19
entity m_muzzleeffect
Definition shotgun.qh:24
string m_name
Definition shotgun.qh:30
string m_canonical_spawnfunc
Definition shotgun.qh:14
string netname
Definition shotgun.qh:29
string mdl
Definition shotgun.qh:20
Model m_model
Definition shotgun.qh:22
int impulse
Definition shotgun.qh:16
float w_crosshair_size
Definition shotgun.qh:27
int spawnflags
Definition shotgun.qh:17
Resource ammo_type
Definition shotgun.qh:15
Model m_muzzlemodel
Definition shotgun.qh:23
fields which are explicitly/manually set are marked with "M", fields set automatically are marked wit...
Definition weapon.qh:44
ATTRIB(Weapon, m_canonical_spawnfunc, string)
the canonical spawnfunc name
#define X()
string W_Model(string w_mdl)
Definition all.qc:232
#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:225
#define SOUND(name, path)
Definition all.qh:30
#define W_PROPS(L, class, prefix)
Definition all.qh:179
#define REGISTER_WEAPON(id, inst)
Definition all.qh:136
const int WEP_FLAG_RELOADABLE
Definition weapon.qh:217
const int WEP_TYPE_HITSCAN
Definition weapon.qh:213
const int WEP_FLAG_BLEED
Definition weapon.qh:225
const int WEP_TYPE_MELEE_SEC
Definition weapon.qh:221
const int WEP_FLAG_NORMAL
Definition weapon.qh:215