Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
hlac.qh
Go to the documentation of this file.
1#pragma once
2
3#ifdef GAMEQC
4MODEL(HLAC_VIEW, W_Model("h_hlac.iqm"));
5MODEL(HLAC_WORLD, W_Model("v_hlac.md3"));
6MODEL(HLAC_ITEM, W_Model("g_hlac.md3"));
7
8SOUND(HLAC_FIRE, W_Sound("lasergun_fire"));
9#endif
10
12#ifdef SVQC
13/* spawnfunc */ ATTRIB(HLAC, m_canonical_spawnfunc, string, "weapon_hlac");
14/* rating */ ATTRIB(HLAC, bot_pickupbasevalue, float, 4000);
15#endif
16/* ammotype */ ATTRIB(HLAC, ammo_type, Resource, RES_CELLS);
17/* impulse */ ATTRIB(HLAC, impulse, int, 6);
19/* color */ ATTRIB(HLAC, m_color, vector, '0.506 0.945 0.239');
20#ifdef GAMEQC
21/* modelname */ ATTRIB(HLAC, mdl, string, "hlac");
22/* model */ ATTRIB(HLAC, m_model, Model, MDL_HLAC_ITEM);
23/* flash mdl */ ATTRIB(HLAC, m_muzzlemodel, Model, MDL_Null);
24/* flash eff */ ATTRIB(HLAC, m_muzzleeffect, entity,
25 (particleeffectnum(EFFECT_GREEN_HLAC_MUZZLEFLASH) < 0)
26 ? EFFECT_BLASTER_MUZZLEFLASH // compatible with Xonotic v0.8.6 or lower
27 : EFFECT_GREEN_HLAC_MUZZLEFLASH);
28#endif
29#ifdef CSQC
30/* crosshair */ ATTRIB(HLAC, w_crosshair, string, "gfx/crosshairhlac");
31/* crosshair */ ATTRIB(HLAC, w_crosshair_size, float, 0.6);
32#endif
33/* wepimg */ ATTRIB(HLAC, model2, string, "weaponhlac");
34/* refname */ ATTRIB(HLAC, netname, string, "hlac");
35/* wepname */ ATTRIB(HLAC, m_name, string, _("Heavy Laser Assault Cannon"));
36
37#define X(BEGIN, P, END, class, prefix) \
38 BEGIN(class) \
39 P(class, prefix, ammo, float, BOTH) \
40 P(class, prefix, animtime, float, BOTH) \
41 P(class, prefix, damage, float, BOTH) \
42 P(class, prefix, edgedamage, float, BOTH) \
43 P(class, prefix, force, float, BOTH) \
44 P(class, prefix, lifetime, float, BOTH) \
45 P(class, prefix, pickup_ammo, float, NONE) \
46 P(class, prefix, radius, float, BOTH) \
47 P(class, prefix, refire, float, BOTH) \
48 P(class, prefix, reload_ammo, float, NONE) \
49 P(class, prefix, reload_time, float, NONE) \
50 P(class, prefix, secondary, float, NONE) \
51 P(class, prefix, shots, float, SEC) \
52 P(class, prefix, speed, float, BOTH) \
53 P(class, prefix, spread, float, SEC) \
54 P(class, prefix, spread_add, float, PRI) \
55 P(class, prefix, spread_crouchmod, float, BOTH) \
56 P(class, prefix, spread_max, float, PRI) \
57 P(class, prefix, spread_min, float, PRI) \
58 P(class, prefix, switchdelay_drop, float, NONE) \
59 P(class, prefix, switchdelay_raise, float, NONE) \
60 P(class, prefix, weaponreplace, string, NONE) \
61 P(class, prefix, weaponstartoverride, float, NONE) \
62 P(class, prefix, weaponstart, float, NONE) \
63 P(class, prefix, weaponthrowable, float, NONE) \
64 END()
65 W_PROPS(X, HLAC, hlac)
66#undef X
67
70
71SPAWNFUNC_WEAPON(weapon_hlac, WEP_HLAC)
var entity(vector mins, vector maxs,.entity tofield) findbox_tofield_OrFallback
Definition hlac.qh:11
Model m_muzzlemodel
Definition hlac.qh:23
int spawnflags
Definition hlac.qh:18
string model2
Definition hlac.qh:33
Model m_model
Definition hlac.qh:22
string mdl
Definition hlac.qh:21
int impulse
Definition hlac.qh:17
Resource ammo_type
Definition hlac.qh:16
string m_canonical_spawnfunc
Definition hlac.qh:13
string m_name
Definition hlac.qh:35
float bot_pickupbasevalue
Definition hlac.qh:14
float w_crosshair_size
Definition hlac.qh:31
string netname
Definition hlac.qh:34
entity m_muzzleeffect
Definition hlac.qh:27
vector m_color
Definition hlac.qh:19
string w_crosshair
Definition hlac.qh:30
Definition model.qh:3
fields which are explicitly/manually set are marked with "M", fields set automatically are marked wit...
Definition weapon.qh:42
#define particleeffectnum(e)
Definition effect.qh:3
#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_SPLASH
Definition weapon.qh:254
const int WEP_FLAG_MUTATORBLOCKED
Definition weapon.qh:261
#define SPAWNFUNC_WEAPON(name, weapon)
Definition weapon.qh:191