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#ifdef SVQC
16/* spawnfunc */ ATTRIB(Vortex, m_canonical_spawnfunc, string, "weapon_vortex");
17/* rating */ ATTRIB(Vortex, bot_pickupbasevalue, float, 8000);
18#endif
19/* ammotype */ ATTRIB(Vortex, ammo_type, Resource, RES_CELLS);
20/* impulse */ ATTRIB(Vortex, impulse, int, 7);
22/* color */ ATTRIB(Vortex, m_color, vector, '0.459 0.765 0.835');
23#ifdef GAMEQC
24/* modelname */ ATTRIB(Vortex, mdl, string, "nex");
25/* model */ ATTRIB(Vortex, m_model, Model, MDL_VORTEX_ITEM);
26/* flash mdl */ ATTRIB(Vortex, m_muzzlemodel, Model, MDL_Null);
27/* flash eff */ ATTRIB(Vortex, m_muzzleeffect, entity, EFFECT_VORTEX_MUZZLEFLASH);
28#endif
29#ifdef CSQC
30/* crosshair */ ATTRIB(Vortex, w_crosshair, string, "gfx/crosshairnex");
31/* crosshair */ ATTRIB(Vortex, w_crosshair_size, float, 0.65);
32/* reticle */ ATTRIB(Vortex, w_reticle, string, "gfx/reticle_nex");
33#endif
34/* wepimg */ ATTRIB(Vortex, model2, string, "weaponnex");
35/* refname */ ATTRIB(Vortex, netname, string, "vortex");
36/* wepname */ ATTRIB(Vortex, m_name, string, _("Vortex"));
37/* legacy */ ATTRIB(Vortex, m_deprecated_netname, string, "nex");
38
39#define X(BEGIN, P, END, class, prefix) \
40 BEGIN(class) \
41 P(class, prefix, ammo, float, BOTH) \
42 P(class, prefix, animtime, float, BOTH) \
43 P(class, prefix, armorpierce, float, BOTH) \
44 P(class, prefix, chargepool, float, SEC) \
45 P(class, prefix, chargepool_pause_regen, float, SEC) \
46 P(class, prefix, chargepool_regen, float, SEC) \
47 P(class, prefix, charge, float, NONE) \
48 P(class, prefix, charge_always, float, NONE) \
49 P(class, prefix, charge_animlimit, float, NONE) \
50 P(class, prefix, charge_limit, float, NONE) \
51 P(class, prefix, charge_maxspeed, float, NONE) \
52 P(class, prefix, charge_mindmg, float, NONE) \
53 P(class, prefix, charge_minspeed, float, NONE) \
54 P(class, prefix, charge_rate, float, NONE) \
55 P(class, prefix, charge_rot_pause, float, NONE) \
56 P(class, prefix, charge_rot_rate, float, NONE) \
57 P(class, prefix, charge_shot_multiplier, float, NONE) \
58 P(class, prefix, charge_start, float, NONE) \
59 P(class, prefix, charge_velocity_rate, float, NONE) \
60 P(class, prefix, damage, float, BOTH) \
61 P(class, prefix, damagefalloff_forcehalflife, float, BOTH) \
62 P(class, prefix, damagefalloff_halflife, float, BOTH) \
63 P(class, prefix, damagefalloff_maxdist, float, BOTH) \
64 P(class, prefix, damagefalloff_mindist, float, BOTH) \
65 P(class, prefix, force, float, BOTH) \
66 P(class, prefix, pickup_ammo, float, NONE) \
67 P(class, prefix, refire, float, BOTH) \
68 P(class, prefix, reload_ammo, float, NONE) \
69 P(class, prefix, reload_time, float, NONE) \
70 P(class, prefix, secondary, float, NONE) \
71 P(class, prefix, switchdelay_raise, float, NONE) \
72 P(class, prefix, switchdelay_drop, float, NONE) \
73 P(class, prefix, weaponreplace, string, NONE) \
74 P(class, prefix, weaponstart, float, NONE) \
75 P(class, prefix, weaponstartoverride, float, NONE) \
76 P(class, prefix, weaponthrowable, float, NONE) \
77 END()
78 W_PROPS(X, Vortex, vortex)
79#undef X
80
83
84SPAWNFUNC_WEAPON(weapon_vortex, WEP_VORTEX)
85SPAWNFUNC_WEAPON(weapon_nex, WEP_VORTEX) // Nexuiz compat
86
87#ifdef CSQC
89#endif
90
91#ifdef SVQC
93
95
96void W_Vortex_Charge(entity actor, .entity weaponentity, float dt);
97#endif
var entity(vector mins, vector maxs,.entity tofield) findbox_tofield_OrFallback
Definition model.qh:3
string model2
Definition vortex.qh:34
entity m_muzzleeffect
Definition vortex.qh:27
vector m_color
Definition vortex.qh:22
string w_reticle
Definition vortex.qh:32
string mdl
Definition vortex.qh:24
string netname
Definition vortex.qh:35
Resource ammo_type
Definition vortex.qh:19
Model m_muzzlemodel
Definition vortex.qh:26
string w_crosshair
Definition vortex.qh:30
int spawnflags
Definition vortex.qh:21
Model m_model
Definition vortex.qh:25
string m_canonical_spawnfunc
Definition vortex.qh:16
string m_deprecated_netname
Definition vortex.qh:37
int impulse
Definition vortex.qh:20
float bot_pickupbasevalue
Definition vortex.qh:17
float w_crosshair_size
Definition vortex.qh:31
string m_name
Definition vortex.qh:36
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
float vortex_charge_rottime
Definition vortex.qh:92
void W_Vortex_Charge(entity actor,.entity weaponentity, float dt)
Definition vortex.qc:174
bool autocvar_cl_particles_oldvortexbeam
Definition vortex.qh:88
float vortex_lasthit
Definition vortex.qh:94
#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
#define SPAWNFUNC_WEAPON(name, weapon)
Definition weapon.qh:191
const int WEP_FLAG_NORMAL
Definition weapon.qh:257