Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
vortex.qh
Go to the documentation of this file.
1#pragma once
2
3#ifdef GAMEQC
4MODEL(VORTEX_MUZZLEFLASH, "models/nexflash.md3");
5MODEL(VORTEX_VIEW, W_Model("h_nex.iqm"));
6MODEL(VORTEX_WORLD, W_Model("v_nex.md3"));
7MODEL(VORTEX_ITEM, W_Model("g_nex.md3"));
8
9SOUND(VORTEX_CHARGE, W_Sound("nexcharge"));
10SOUND(VORTEX_FIRE, W_Sound("nexfire"));
11SOUND(VORTEX_IMPACT, W_Sound("neximpact"));
12#endif
13
15/* spawnfunc */ ATTRIB(Vortex, m_canonical_spawnfunc, string, "weapon_vortex");
16/* ammotype */ ATTRIB(Vortex, ammo_type, Resource, RES_CELLS);
17/* impulse */ ATTRIB(Vortex, impulse, int, 7);
19/* rating */ ATTRIB(Vortex, bot_pickupbasevalue, float, 8000);
20/* color */ ATTRIB(Vortex, m_color, vector, '0.459 0.765 0.835');
21/* modelname */ ATTRIB(Vortex, mdl, string, "nex");
22#ifdef GAMEQC
23/* model */ ATTRIB(Vortex, m_model, Model, MDL_VORTEX_ITEM);
24/* flash mdl */ ATTRIB(Vortex, m_muzzlemodel, Model, MDL_Null);
25/* flash eff */ ATTRIB(Vortex, m_muzzleeffect, entity, EFFECT_VORTEX_MUZZLEFLASH);
26#endif
27/* crosshair */ ATTRIB(Vortex, w_crosshair, string, "gfx/crosshairnex");
28/* crosshair */ ATTRIB(Vortex, w_crosshair_size, float, 0.65);
29/* reticle */ ATTRIB(Vortex, w_reticle, string, "gfx/reticle_nex");
30/* wepimg */ ATTRIB(Vortex, model2, string, "weaponnex");
31/* refname */ ATTRIB(Vortex, netname, string, "vortex");
32/* wepname */ ATTRIB(Vortex, m_name, string, _("Vortex"));
33/* legacy */ ATTRIB(Vortex, m_deprecated_netname, string, "nex");
34
35#define X(BEGIN, P, END, class, prefix) \
36 BEGIN(class) \
37 P(class, prefix, ammo, float, BOTH) \
38 P(class, prefix, animtime, float, BOTH) \
39 P(class, prefix, armorpierce, float, BOTH) \
40 P(class, prefix, chargepool, float, SEC) \
41 P(class, prefix, chargepool_pause_regen, float, SEC) \
42 P(class, prefix, chargepool_regen, float, SEC) \
43 P(class, prefix, charge, float, NONE) \
44 P(class, prefix, charge_always, float, NONE) \
45 P(class, prefix, charge_animlimit, float, NONE) \
46 P(class, prefix, charge_limit, float, NONE) \
47 P(class, prefix, charge_maxspeed, float, NONE) \
48 P(class, prefix, charge_mindmg, float, NONE) \
49 P(class, prefix, charge_minspeed, float, NONE) \
50 P(class, prefix, charge_rate, float, NONE) \
51 P(class, prefix, charge_rot_pause, float, NONE) \
52 P(class, prefix, charge_rot_rate, float, NONE) \
53 P(class, prefix, charge_shot_multiplier, float, NONE) \
54 P(class, prefix, charge_start, float, NONE) \
55 P(class, prefix, charge_velocity_rate, float, NONE) \
56 P(class, prefix, damage, float, BOTH) \
57 P(class, prefix, damagefalloff_forcehalflife, float, BOTH) \
58 P(class, prefix, damagefalloff_halflife, float, BOTH) \
59 P(class, prefix, damagefalloff_maxdist, float, BOTH) \
60 P(class, prefix, damagefalloff_mindist, float, BOTH) \
61 P(class, prefix, force, float, BOTH) \
62 P(class, prefix, pickup_ammo, float, NONE) \
63 P(class, prefix, refire, float, BOTH) \
64 P(class, prefix, reload_ammo, float, NONE) \
65 P(class, prefix, reload_time, float, NONE) \
66 P(class, prefix, secondary, float, NONE) \
67 P(class, prefix, switchdelay_raise, float, NONE) \
68 P(class, prefix, switchdelay_drop, float, NONE) \
69 P(class, prefix, weaponreplace, string, NONE) \
70 P(class, prefix, weaponstart, float, NONE) \
71 P(class, prefix, weaponstartoverride, float, NONE) \
72 P(class, prefix, weaponthrowable, float, NONE) \
73 END()
74 W_PROPS(X, Vortex, vortex)
75#undef X
76
79
80SPAWNFUNC_WEAPON(weapon_vortex, WEP_VORTEX)
81SPAWNFUNC_WEAPON(weapon_nex, WEP_VORTEX) // Nexuiz compat
82
83#ifdef CSQC
85#endif
86
87#ifdef SVQC
89
91
92void W_Vortex_Charge(entity actor, .entity weaponentity, float dt);
93#endif
var entity(vector mins, vector maxs,.entity tofield) findbox_tofield_OrFallback
Definition model.qh:3
string model2
Definition vortex.qh:30
entity m_muzzleeffect
Definition vortex.qh:25
vector m_color
Definition vortex.qh:20
string w_reticle
Definition vortex.qh:29
string mdl
Definition vortex.qh:21
string netname
Definition vortex.qh:31
Resource ammo_type
Definition vortex.qh:16
Model m_muzzlemodel
Definition vortex.qh:24
string w_crosshair
Definition vortex.qh:27
int spawnflags
Definition vortex.qh:18
Model m_model
Definition vortex.qh:23
string m_canonical_spawnfunc
Definition vortex.qh:15
string m_deprecated_netname
Definition vortex.qh:33
int impulse
Definition vortex.qh:17
float bot_pickupbasevalue
Definition vortex.qh:19
float w_crosshair_size
Definition vortex.qh:28
string m_name
Definition vortex.qh:32
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
float vortex_charge_rottime
Definition vortex.qh:88
void W_Vortex_Charge(entity actor,.entity weaponentity, float dt)
Definition vortex.qc:173
bool autocvar_cl_particles_oldvortexbeam
Definition vortex.qh:84
float vortex_lasthit
Definition vortex.qh:90
#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
#define SPAWNFUNC_WEAPON(name, weapon)
Definition weapon.qh:150
const int WEP_FLAG_NORMAL
Definition weapon.qh:215