Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
vortex.qc
Go to the documentation of this file.
1#include "vortex.qh"
2
3//REGISTER_STAT(WEP_CVAR_vortex_charge, bool, WEP_CVAR(WEP_VORTEX, charge))
4//REGISTER_STAT(WEP_CVAR_vortex_charge_animlimit, float, WEP_CVAR(WEP_VORTEX, charge_animlimit))
5
6#if defined(GAMEQC)
7vector vortex_glowcolor(int actor_colors, float charge)
8{
9 if (!WEP_CVAR(WEP_VORTEX, charge)) return '0 0 0';
10
11 float animlimit = WEP_CVAR(WEP_VORTEX, charge_animlimit);
12 float f = min(1, charge / animlimit);
13 vector mycolors = colormapPaletteColor(actor_colors & 0x0F, true);
14 vector g = f * (mycolors * 0.3);
15 if (charge > animlimit)
16 {
17 f = (charge - animlimit) / (1 - animlimit);
18 g += f * (mycolors * 0.7);
19 }
20 // transition color can't be '0 0 0' as it defaults to player model glow color
21 if (g == '0 0 0')
22 g = '0 0 0.000001';
23
24 return g;
25}
26
27METHOD(Vortex, wr_glow, vector(Vortex this, int actor_colors, entity wepent))
28{
29 return vortex_glowcolor(actor_colors, max(0.25, wepent.vortex_charge));
30}
31#endif
32
33#ifdef GAMEQC
34REGISTER_NET_TEMP(TE_CSQC_VORTEXBEAMPARTICLE)
35#endif
36
37#if defined(SVQC)
38void SendCSQCVortexBeamParticle(entity player, float charge) {
39 vector v;
41 WriteHeader(MSG_BROADCAST, TE_CSQC_VORTEXBEAMPARTICLE);
42 WriteVector(MSG_BROADCAST, w_shotorg);
43 WriteVector(MSG_BROADCAST, v);
44 WriteByte(MSG_BROADCAST, bound(0, 255 * charge, 255));
46}
47#elif defined(CSQC)
48NET_HANDLE(TE_CSQC_VORTEXBEAMPARTICLE, bool isNew)
49{
50 float charge;
52 vector endpos = ReadVector();
53 charge = ReadByte() / 255.0;
54 int myowner = ReadByte();
55
56 int eff_flags = PARTICLES_USEALPHA | PARTICLES_USEFADE;
57
58 //pointparticles(EFFECT_VORTEX_MUZZLEFLASH, shotorg, normalize(endpos - shotorg) * 1000, 1);
59
60 charge = sqrt(charge); // divide evenly among trail spacing and alpha
63 {
64 float mycolors = entcs_GetClientColors(myowner - 1);
65 vector rgb = vortex_glowcolor(mycolors, max(0.25, charge));
66 // in the event of charging being turned off, fall back to player colours
67 if(rgb == '0 0 0')
68 rgb = colormapPaletteColor(mycolors & 0x0F, true);
70 eff_flags |= PARTICLES_USECOLOR;
71 }
72
73 if(!MUTATOR_CALLHOOK(Particles_VortexBeam, shotorg, endpos))
74 {
76 WarpZone_TrailParticles_WithMultiplier(NULL, particleeffectnum(EFFECT_VORTEX_BEAM_OLD), shotorg, endpos, 1, eff_flags);
77 else
78 WarpZone_TrailParticles_WithMultiplier(NULL, particleeffectnum(EFFECT_VORTEX_BEAM), shotorg, endpos, 1, eff_flags);
79 }
80 return true;
81}
82#endif
83
84#ifdef SVQC
85
87
89{
90 entity player = M_ARGV(0, entity);
91
92 // WEAPONTODO
93 if(!WEP_CVAR(WEP_VORTEX, charge) || !WEP_CVAR(WEP_VORTEX, charge_velocity_rate))
94 return;
95
96 for(int slot = 0; slot < MAX_WEAPONSLOTS; ++slot)
97 {
98 .entity weaponentity = weaponentities[slot];
99
100 if (player.(weaponentity).m_weapon == WEP_VORTEX && WEP_CVAR(WEP_VORTEX, charge) && WEP_CVAR(WEP_VORTEX, charge_velocity_rate) && vdist(vec2(player.velocity), >, WEP_CVAR(WEP_VORTEX, charge_minspeed)))
101 {
102 float xyspeed = vlen(vec2(player.velocity));
103 // add a maximum of charge_velocity_rate when going fast (f = 1), gradually increasing from minspeed (f = 0) to maxspeed
104 xyspeed = min(xyspeed, WEP_CVAR(WEP_VORTEX, charge_maxspeed));
105 float f = (xyspeed - WEP_CVAR(WEP_VORTEX, charge_minspeed)) / (WEP_CVAR(WEP_VORTEX, charge_maxspeed) - WEP_CVAR(WEP_VORTEX, charge_minspeed));
106 // add the extra charge
107 player.(weaponentity).vortex_charge = min(1, player.(weaponentity).vortex_charge + WEP_CVAR(WEP_VORTEX, charge_velocity_rate) * f * PHYS_INPUT_TIMELENGTH);
108 }
109 }
110}
111
112void W_Vortex_Attack(Weapon thiswep, entity actor, .entity weaponentity, float issecondary)
113{
114 float mydmg, myforce, mymindist, mymaxdist, myhalflife, myforcehalflife, myammo, charge;
115
116 mydmg = WEP_CVAR_BOTH(WEP_VORTEX, !issecondary, damage);
117 myforce = WEP_CVAR_BOTH(WEP_VORTEX, !issecondary, force);
118 mymindist = WEP_CVAR_BOTH(WEP_VORTEX, !issecondary, damagefalloff_mindist);
119 mymaxdist = WEP_CVAR_BOTH(WEP_VORTEX, !issecondary, damagefalloff_maxdist);
120 myhalflife = WEP_CVAR_BOTH(WEP_VORTEX, !issecondary, damagefalloff_halflife);
121 myforcehalflife = WEP_CVAR_BOTH(WEP_VORTEX, !issecondary, damagefalloff_forcehalflife);
122 myammo = WEP_CVAR_BOTH(WEP_VORTEX, !issecondary, ammo);
123
124 float dtype = thiswep.m_id;
125 if(WEP_CVAR_BOTH(WEP_VORTEX, !issecondary, armorpierce))
126 dtype |= HITTYPE_ARMORPIERCE;
127
128 float flying;
129 flying = IsFlying(actor); // do this BEFORE to make the trace values from FireRailgunBullet last
130
131 if(WEP_CVAR(WEP_VORTEX, charge))
132 {
133 charge = WEP_CVAR(WEP_VORTEX, charge_mindmg) / mydmg + (1 - WEP_CVAR(WEP_VORTEX, charge_mindmg) / mydmg) * actor.(weaponentity).vortex_charge;
134 actor.(weaponentity).vortex_charge *= WEP_CVAR(WEP_VORTEX, charge_shot_multiplier); // do this AFTER setting mydmg/myforce
135 // O RLY? -- divVerent
136 // YA RLY -- FruitieX
137 }
138 else
139 charge = 1;
140 mydmg *= charge;
141 myforce *= charge;
142
143 W_SetupShot(actor, weaponentity, true, 5, SND_VORTEX_FIRE, CH_WEAPON_A, mydmg, dtype);
144 if(charge > WEP_CVAR(WEP_VORTEX, charge_animlimit) && WEP_CVAR(WEP_VORTEX, charge_animlimit)) // if the Vortex is overcharged, we play an extra sound
145 {
146 sound(actor, CH_WEAPON_B, SND_VORTEX_CHARGE, VOL_BASE * (charge - 0.5 * WEP_CVAR(WEP_VORTEX, charge_animlimit)) / (1 - 0.5 * WEP_CVAR(WEP_VORTEX, charge_animlimit)), ATTN_NORM);
147 }
148
149 yoda = 0;
150 impressive_hits = 0;
151 FireRailgunBullet(actor, weaponentity, w_shotorg, w_shotorg + w_shotdir * max_shot_distance, mydmg, false, myforce, mymindist, mymaxdist, myhalflife, myforcehalflife, dtype);
152
153 if(yoda && flying)
154 Send_Notification(NOTIF_ONE, actor, MSG_ANNCE, ANNCE_ACHIEVEMENT_YODA);
155 if(impressive_hits && actor.vortex_lasthit)
156 {
157 Send_Notification(NOTIF_ONE, actor, MSG_ANNCE, ANNCE_ACHIEVEMENT_IMPRESSIVE);
158 impressive_hits = 0; // only every second time
159 }
160
161 actor.vortex_lasthit = impressive_hits;
162
163 //beam done on client
165 W_MuzzleFlash(thiswep, actor, weaponentity, w_shotorg, normalize(v - w_shotorg));
166 SendCSQCVortexBeamParticle(actor, charge);
167
168 W_DecreaseAmmo(thiswep, actor, myammo, weaponentity);
169}
170
172
173void W_Vortex_Charge(entity actor, .entity weaponentity, float dt)
174{
175 if(WEP_CVAR(WEP_VORTEX, charge) && actor.(weaponentity).vortex_charge < WEP_CVAR(WEP_VORTEX, charge_limit))
176 actor.(weaponentity).vortex_charge = min(1, actor.(weaponentity).vortex_charge + WEP_CVAR(WEP_VORTEX, charge_rate) * dt);
177}
178
179METHOD(Vortex, wr_aim, void(entity thiswep, entity actor, .entity weaponentity))
180{
181 if(bot_aim(actor, weaponentity, 1000000, 0, 1, false, true))
182 PHYS_INPUT_BUTTON_ATCK(actor) = true;
183}
184METHOD(Vortex, wr_think, void(entity thiswep, entity actor, .entity weaponentity, int fire))
185{
186 if(!WEP_CVAR(WEP_VORTEX, charge_always))
187 W_Vortex_Charge(actor, weaponentity, frametime / W_TICSPERFRAME);
188
189 if(WEP_CVAR_SEC(WEP_VORTEX, chargepool))
190 if(actor.(weaponentity).vortex_chargepool_ammo < 1)
191 {
192 if(actor.vortex_chargepool_pauseregen_finished < time)
193 actor.(weaponentity).vortex_chargepool_ammo = min(1, actor.(weaponentity).vortex_chargepool_ammo + WEP_CVAR_SEC(WEP_VORTEX, chargepool_regen) * frametime / W_TICSPERFRAME);
194 actor.pauseregen_finished = max(actor.pauseregen_finished, time + WEP_CVAR_SEC(WEP_VORTEX, chargepool_pause_regen));
195 }
196
197 if(autocvar_g_balance_vortex_reload_ammo && actor.(weaponentity).clip_load < min(WEP_CVAR_PRI(WEP_VORTEX, ammo), WEP_CVAR_SEC(WEP_VORTEX, ammo))) { // forced reload
198 thiswep.wr_reload(thiswep, actor, weaponentity);
199 } else
200 {
201 if(fire & 1)
202 {
203 if(weapon_prepareattack(thiswep, actor, weaponentity, false, WEP_CVAR_PRI(WEP_VORTEX, refire)))
204 {
205 W_Vortex_Attack(thiswep, actor, weaponentity, 0);
206 weapon_thinkf(actor, weaponentity, WFRAME_FIRE1, WEP_CVAR_PRI(WEP_VORTEX, animtime), w_ready);
207 }
208 }
209 if((WEP_CVAR(WEP_VORTEX, charge) && !WEP_CVAR(WEP_VORTEX, secondary)) ? (PHYS_INPUT_BUTTON_ZOOM(actor) | PHYS_INPUT_BUTTON_ZOOMSCRIPT(actor)) : (fire & 2))
210 {
211 if(WEP_CVAR(WEP_VORTEX, charge))
212 {
213 actor.(weaponentity).vortex_charge_rottime = time + WEP_CVAR(WEP_VORTEX, charge_rot_pause);
214 float dt = frametime / W_TICSPERFRAME;
215
216 if(actor.(weaponentity).vortex_charge < 1)
217 {
218 if(WEP_CVAR_SEC(WEP_VORTEX, chargepool))
219 {
220 if(WEP_CVAR_SEC(WEP_VORTEX, ammo))
221 {
222 // always deplete if secondary is held
223 actor.(weaponentity).vortex_chargepool_ammo = max(0, actor.(weaponentity).vortex_chargepool_ammo - WEP_CVAR_SEC(WEP_VORTEX, ammo) * dt);
224
225 dt = min(dt, (1 - actor.(weaponentity).vortex_charge) / WEP_CVAR(WEP_VORTEX, charge_rate));
226 actor.vortex_chargepool_pauseregen_finished = time + WEP_CVAR_SEC(WEP_VORTEX, chargepool_pause_regen);
227 dt = min(dt, actor.(weaponentity).vortex_chargepool_ammo);
228 dt = max(0, dt);
229
230 actor.(weaponentity).vortex_charge += dt * WEP_CVAR(WEP_VORTEX, charge_rate);
231 }
232 }
233
234 else if(WEP_CVAR_SEC(WEP_VORTEX, ammo))
235 {
236 if(fire & 2) // only eat ammo when the button is pressed
237 {
238 dt = min(dt, (1 - actor.(weaponentity).vortex_charge) / WEP_CVAR(WEP_VORTEX, charge_rate));
239 if(!(actor.items & IT_UNLIMITED_AMMO))
240 {
241 // if this weapon is reloadable, decrease its load. Else decrease the player's ammo
242 if(autocvar_g_balance_vortex_reload_ammo)
243 {
244 dt = min(dt, (actor.(weaponentity).clip_load - WEP_CVAR_PRI(WEP_VORTEX, ammo)) / WEP_CVAR_SEC(WEP_VORTEX, ammo));
245 dt = max(0, dt);
246 if(dt > 0)
247 {
248 actor.(weaponentity).clip_load = max(WEP_CVAR_SEC(WEP_VORTEX, ammo), actor.(weaponentity).clip_load - WEP_CVAR_SEC(WEP_VORTEX, ammo) * dt);
249 }
250 actor.(weaponentity).(weapon_load[thiswep.m_id]) = actor.(weaponentity).clip_load;
251 }
252 else
253 {
254 dt = min(dt, (GetResource(actor, thiswep.ammo_type) - WEP_CVAR_PRI(WEP_VORTEX, ammo)) / WEP_CVAR_SEC(WEP_VORTEX, ammo));
255 dt = max(0, dt);
256 if(dt > 0)
257 {
258 SetResource(actor, thiswep.ammo_type, max(WEP_CVAR_SEC(WEP_VORTEX, ammo), GetResource(actor, thiswep.ammo_type) - WEP_CVAR_SEC(WEP_VORTEX, ammo) * dt));
259 }
260 }
261 }
262 actor.(weaponentity).vortex_charge += dt * WEP_CVAR(WEP_VORTEX, charge_rate);
263 }
264 }
265
266 else
267 {
268 dt = min(dt, (1 - actor.(weaponentity).vortex_charge) / WEP_CVAR(WEP_VORTEX, charge_rate));
269 actor.(weaponentity).vortex_charge += dt * WEP_CVAR(WEP_VORTEX, charge_rate);
270 }
271 }
272 }
273 else if(WEP_CVAR(WEP_VORTEX, secondary))
274 {
275 if(weapon_prepareattack(thiswep, actor, weaponentity, false, WEP_CVAR_SEC(WEP_VORTEX, refire)))
276 {
277 W_Vortex_Attack(thiswep, actor, weaponentity, 1);
278 weapon_thinkf(actor, weaponentity, WFRAME_FIRE1, WEP_CVAR_SEC(WEP_VORTEX, animtime), w_ready);
279 }
280 }
281 }
282 }
283}
284METHOD(Vortex, wr_setup, void(entity thiswep, entity actor, .entity weaponentity))
285{
286 actor.vortex_lasthit = 0;
287}
288METHOD(Vortex, wr_checkammo1, bool(entity thiswep, entity actor, .entity weaponentity))
289{
290 float ammo_amount = GetResource(actor, thiswep.ammo_type) >= WEP_CVAR_PRI(WEP_VORTEX, ammo);
291 ammo_amount += (autocvar_g_balance_vortex_reload_ammo && actor.(weaponentity).(weapon_load[thiswep.m_id]) >= WEP_CVAR_PRI(WEP_VORTEX, ammo));
292 return ammo_amount;
293}
294METHOD(Vortex, wr_checkammo2, bool(entity thiswep, entity actor, .entity weaponentity))
295{
296 if(WEP_CVAR(WEP_VORTEX, secondary))
297 {
298 // don't allow charging if we don't have enough ammo
299 float ammo_amount = GetResource(actor, thiswep.ammo_type) >= WEP_CVAR_SEC(WEP_VORTEX, ammo);
300 ammo_amount += actor.(weaponentity).(weapon_load[thiswep.m_id]) >= WEP_CVAR_SEC(WEP_VORTEX, ammo);
301 return ammo_amount;
302 }
303 else
304 {
305 return false; // zoom is not a fire mode
306 }
307}
308METHOD(Vortex, wr_resetplayer, void(entity thiswep, entity actor))
309{
310 if (WEP_CVAR(WEP_VORTEX, charge)) {
311 for(int slot = 0; slot < MAX_WEAPONSLOTS; ++slot)
312 {
313 .entity weaponentity = weaponentities[slot];
314 actor.(weaponentity).vortex_charge = WEP_CVAR(WEP_VORTEX, charge_start);
315
316 if (WEP_CVAR_SEC(WEP_VORTEX, chargepool))
317 actor.(weaponentity).vortex_chargepool_ammo = 1;
318 }
319 }
320 actor.vortex_lasthit = 0;
321}
322METHOD(Vortex, wr_reload, void(entity thiswep, entity actor, .entity weaponentity))
323{
324 W_Reload(actor, weaponentity, min(WEP_CVAR_PRI(WEP_VORTEX, ammo), WEP_CVAR_SEC(WEP_VORTEX, ammo)), SND_RELOAD);
325}
326METHOD(Vortex, wr_suicidemessage, Notification(entity thiswep))
327{
328 return WEAPON_THINKING_WITH_PORTALS;
329}
330METHOD(Vortex, wr_killmessage, Notification(entity thiswep))
331{
332 return WEAPON_VORTEX_MURDER;
333}
334METHOD(Vortex, wr_zoom, bool(entity thiswep, entity actor))
335{
336 return PHYS_INPUT_BUTTON_ATCK2(actor) && !WEP_CVAR(WEP_VORTEX, secondary);
337}
338
339#endif
340#ifdef CSQC
341
342METHOD(Vortex, wr_impacteffect, void(entity thiswep, entity actor))
343{
344 entity this = actor;
345 vector org2 = w_org + w_backoff * 2;
346 bool usecolor = ((teamplay && autocvar_cl_tracers_teamcolor == 1) || autocvar_cl_tracers_teamcolor == 2);
347 boxparticles(particleeffectnum(EFFECT_VORTEX_IMPACT), NULL, org2, org2, '0 0 0', '0 0 0', 1, ((usecolor) ? PARTICLES_USECOLOR : 0));
348 if(!w_issilent)
349 sound(this, CH_SHOTS, SND_VORTEX_IMPACT, VOL_BASE, ATTN_NORM);
350}
351METHOD(Vortex, wr_init, void(entity thiswep))
352{
354 {
355 precache_pic("gfx/reticle_nex");
356 }
357}
358METHOD(Vortex, wr_zoom, bool(entity thiswep, entity actor))
359{
360 if(button_zoom || zoomscript_caught || (!WEP_CVAR(WEP_VORTEX, secondary) && button_attack2))
361 {
362 return true;
363 }
364 else
365 {
366 // no weapon specific image for this weapon
367 return false;
368 }
369}
370METHOD(Vortex, wr_zoomdir, bool(entity thiswep))
371{
372 return button_attack2 && !WEP_CVAR(WEP_VORTEX, secondary);
373}
374
375#endif
376#ifdef MENUQC
378#include "rifle.qh"
379
380METHOD(Vortex, describe, string(Vortex this))
381{
382 TC(Vortex, this);
384 PAR(_("The %s fires harmful beams of energy that traverse the map instantaneously and deal a significant chunk of damage on impact."), COLORED_NAME(this));
385 PAR(_("The secondary fire zooms in when held, allowing for ease of aiming."));
386 PAR(_("It consumes %s ammo for each shot."), COLORED_NAME(ITEM_Cells)); // shared string
387 PAR(_("Unlike the %s, the %s doesn't need to be reloaded manually, although you have to wait a couple seconds between shots. "
388 "Uniquely, it can be fired slightly before it finishes completely reloading, albeit with the tradeoff of dealing slightly less damage."), COLORED_NAME(WEP_RIFLE), COLORED_NAME(this));
389 PAR(_("Similar to the %s, the %s can be used at any range, but it stands out at long ranges."), COLORED_NAME(WEP_RIFLE), COLORED_NAME(this));
390 PAR(W_Guide_Keybinds(this));
391 PAR(W_Guide_DPS_onlyOne(this.netname, "primary"));
392 return PAGE_TEXT;
393}
394
395#endif
vector shotorg
Definition aim.qh:10
bool bot_aim(entity this,.entity weaponentity, float shotspeed, float shotspeedupward, float maxshottime, float applygravity, bool shot_accurate)
#define MUTATOR_CALLHOOK(id,...)
Definition base.qh:143
#define REGISTER_MUTATOR(...)
Definition base.qh:295
#define MUTATOR_HOOKFUNCTION(...)
Definition base.qh:335
var entity(vector mins, vector maxs,.entity tofield) findbox_tofield_OrFallback
void SetResource(entity e, Resource res_type, float amount)
Sets the current amount of resource the given entity will have.
float GetResource(entity e, Resource res_type)
Returns the current amount of resource the given entity has.
fields which are explicitly/manually set are marked with "M", fields set automatically are marked wit...
Definition weapon.qh:44
int m_id
Definition weapon.qh:45
string netname
Definition powerups.qc:20
bool button_zoom
Definition main.qh:113
bool button_attack2
Definition main.qh:116
#define colormapPaletteColor(c, isPants)
Definition color.qh:5
#define COLORED_NAME(this)
Definition color.qh:195
const int IT_UNLIMITED_AMMO
Definition item.qh:23
#define M_ARGV(x, type)
Definition events.qh:17
bool IsFlying(entity this)
Definition player.qc:836
#define PHYS_INPUT_TIMELENGTH
Definition player.qh:254
#define PHYS_INPUT_BUTTON_ZOOMSCRIPT(s)
Definition player.qh:161
#define PHYS_INPUT_BUTTON_ATCK(s)
Definition player.qh:150
#define PHYS_INPUT_BUTTON_ZOOM(s)
Definition player.qh:153
#define PHYS_INPUT_BUTTON_ATCK2(s)
Definition player.qh:152
bool autocvar_cl_reticle_weapon
Definition crosshair.qh:5
bool autocvar_cl_reticle
Definition crosshair.qh:3
vector particles_colormin
float frametime
float time
vector trace_endpos
float particles_alphamax
vector particles_colormax
float PARTICLES_USEALPHA
float particles_alphamin
const float ATTN_NORM
float PARTICLES_USECOLOR
float particles_fade
float PARTICLES_USEFADE
float yoda
Definition damage.qh:48
int impressive_hits
Definition damage.qh:49
vector w_org
vector w_backoff
float w_issilent
const int HITTYPE_ARMORPIERCE
Definition all.qh:32
#define particleeffectnum(e)
Definition effect.qh:3
int entcs_GetClientColors(int i)
Definition ent_cs.qh:115
#define TC(T, sym)
Definition _all.inc:82
#define NET_HANDLE(id, param)
Definition net.qh:15
#define ReadVector()
Definition net.qh:367
#define WriteHeader(to, id)
Definition net.qh:221
int ReadByte()
#define REGISTER_NET_TEMP(id)
Definition net.qh:28
void WarpZone_TrailParticles_WithMultiplier(entity own, float eff, vector org, vector end, float f, int boxflags)
Definition common.qc:489
vector WarpZone_UnTransformOrigin(entity wz, vector v)
Definition common.qc:545
entity WarpZone_trace_transform
Definition common.qh:37
float bound(float min, float value, float max)
string precache_pic(string name,...)
float vlen(vector v)
float sqrt(float f)
float min(float f,...)
vector normalize(vector v)
void WriteByte(float data, float dest, float desto)
float MSG_BROADCAST
Definition menudefs.qc:55
float max(float f,...)
#define etof(e)
Definition misc.qh:25
void Send_Notification(NOTIF broadcast, entity client, MSG net_type, Notification net_name,...count)
Definition all.qc:1573
entity Notification
always last
Definition all.qh:81
#define METHOD(cname, name, prototype)
Definition oo.qh:269
#define NULL
Definition post.qh:14
vector
Definition self.qh:92
void GetPressedKeys(entity this)
Definition client.qc:1761
const float VOL_BASE
Definition sound.qh:36
const int CH_SHOTS
Definition sound.qh:14
const int CH_WEAPON_A
Definition sound.qh:7
#define sound(e, c, s, v, a)
Definition sound.qh:52
const int CH_WEAPON_B
Definition sound.qh:8
#define PAGE_TEXT
Definition string.qh:643
#define PAR(...)
Adds an individually translatable paragraph to PAGE_TEXT without having to deal with strcat and sprin...
Definition string.qh:649
#define PAGE_TEXT_INIT()
Definition string.qh:642
float ammo
Definition sv_turrets.qh:43
bool teamplay
Definition teams.qh:59
void FireRailgunBullet(entity this,.entity weaponentity, vector start, vector end, float bdamage, bool headshot_notify, float bforce, float mindist, float maxdist, float halflifedist, float forcehalflifedist, int deathtype)
Definition tracing.qc:238
vector w_shotdir
Definition tracing.qh:20
vector w_shotorg
Definition tracing.qh:19
#define W_SetupShot(ent, wepent, antilag, recoil, snd, chan, maxdamage, deathtype)
Definition tracing.qh:34
#define vdist(v, cmp, f)
Vector distance comparison, avoids sqrt()
Definition vector.qh:8
#define vec2(...)
Definition vector.qh:90
float zoomscript_caught
Definition view.qh:121
void W_Vortex_Attack(Weapon thiswep, entity actor,.entity weaponentity, float issecondary)
Definition vortex.qc:112
void SendCSQCVortexBeamParticle(entity player, float charge)
Definition vortex.qc:38
vector vortex_glowcolor(int actor_colors, float charge)
Definition vortex.qc:7
void W_Vortex_Charge(entity actor,.entity weaponentity, float dt)
Definition vortex.qc:173
float vortex_chargepool_pauseregen_finished
Definition vortex.qc:171
float vortex_charge_rottime
Definition vortex.qh:88
bool autocvar_cl_particles_oldvortexbeam
Definition vortex.qh:84
string W_Guide_Keybinds(Weapon wep)
Definition all.qc:836
void W_MuzzleFlash(Weapon thiswep, entity actor,.entity weaponentity, vector shotorg, vector shotdir)
Definition all.qc:728
string W_Guide_DPS_onlyOne(string name, string fire)
Definition all.qc:926
#define WEP_CVAR_PRI(wep, name)
Definition all.qh:322
#define WEP_CVAR_BOTH(wep, isprimary, name)
Definition all.qh:324
#define WEP_CVAR(wep, name)
Definition all.qh:321
#define WEP_CVAR_SEC(wep, name)
Definition all.qh:323
const int MAX_WEAPONSLOTS
Definition weapon.qh:16
int max_shot_distance
Definition weapon.qh:203
entity weaponentities[MAX_WEAPONSLOTS]
Definition weapon.qh:17
int autocvar_cl_tracers_teamcolor
Definition weapon.qh:207
void W_DecreaseAmmo(Weapon wep, entity actor, float ammo_use,.entity weaponentity)
void W_Reload(entity actor,.entity weaponentity, float sent_ammo_min, Sound sent_sound)
void weapon_thinkf(entity actor,.entity weaponentity, WFRAME fr, float t, void(Weapon thiswep, entity actor,.entity weaponentity, int fire) func)
bool weapon_prepareattack(Weapon thiswep, entity actor,.entity weaponentity, bool secondary, float attacktime)
void w_ready(Weapon thiswep, entity actor,.entity weaponentity, int fire)
const int W_TICSPERFRAME
float weapon_load[REGISTRY_MAX(Weapons)]
float vortex_charge
Definition wepent.qh:6
float vortex_chargepool_ammo
Definition wepent.qh:7
int clip_load
Definition wepent.qh:14