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#ifdef GAMEQC
7vector vortex_glowcolor(int actor_colors, float charge)
8{
9 if (!WEP_CVAR(WEP_VORTEX, charge))
10 return '0 0 0';
11
12 float animlimit = WEP_CVAR(WEP_VORTEX, charge_animlimit);
13 float f = min(1, charge / animlimit);
14 vector mycolors = colormapPaletteColor(actor_colors & 0x0F, true);
15 vector g = f * (mycolors * 0.3);
16 if (charge > animlimit)
17 {
18 f = (charge - animlimit) / (1 - animlimit);
19 g += f * (mycolors * 0.7);
20 }
21 // transition color can't be '0 0 0' as it defaults to player model glow color
22 if (g == '0 0 0')
23 g = '0 0 0.000001';
24
25 return g;
26}
27
28METHOD(Vortex, wr_glow, vector(Vortex this, int actor_colors, entity wepent))
29{
30 return vortex_glowcolor(actor_colors, max(0.25, wepent.vortex_charge));
31}
32
33REGISTER_NET_TEMP(TE_CSQC_VORTEXBEAMPARTICLE)
34#endif // GAMEQC
35
36#ifdef SVQC
37void SendCSQCVortexBeamParticle(entity player, float charge)
38{
40 WriteHeader(MSG_BROADCAST, TE_CSQC_VORTEXBEAMPARTICLE);
41 WriteVector(MSG_BROADCAST, w_shotorg);
42 WriteVector(MSG_BROADCAST, v);
43 WriteByte(MSG_BROADCAST, bound(0, 255 * charge, 255));
45}
46
47#endif // SVQC
48#ifdef CSQC
49
50NET_HANDLE(TE_CSQC_VORTEXBEAMPARTICLE, bool isNew)
51{
53 vector endpos = ReadVector();
54 float charge = ReadByte() / 255.0;
55 int myowner = ReadByte();
56
57 int eff_flags = PARTICLES_USEALPHA | PARTICLES_USEFADE;
58
59 //pointparticles(EFFECT_VORTEX_MUZZLEFLASH, shotorg, normalize(endpos - shotorg) * 1000, 1);
60
61 charge = sqrt(charge); // divide evenly among trail spacing and alpha
64 {
65 float mycolors = entcs_GetClientColors(myowner - 1);
66 vector rgb = vortex_glowcolor(mycolors, max(0.25, charge));
67 // in the event of charging being turned off, fall back to player colours
68 if (rgb == '0 0 0')
69 rgb = colormapPaletteColor(mycolors & 0x0F, true);
71 eff_flags |= PARTICLES_USECOLOR;
72 }
73
74 if (!MUTATOR_CALLHOOK(Particles_VortexBeam, shotorg, endpos))
75 {
77 WarpZone_TrailParticles_WithMultiplier(NULL, particleeffectnum(EFFECT_VORTEX_BEAM_OLD), shotorg, endpos, 1, eff_flags);
78 else
79 WarpZone_TrailParticles_WithMultiplier(NULL, particleeffectnum(EFFECT_VORTEX_BEAM), shotorg, endpos, 1, eff_flags);
80 }
81 return true;
82}
83
84#endif // CSQC
85#ifdef SVQC
86
88
90{
91 entity player = M_ARGV(0, entity);
92
93 // WEAPONTODO
94 if (!WEP_CVAR(WEP_VORTEX, charge) || !WEP_CVAR(WEP_VORTEX, charge_velocity_rate))
95 return;
96
97 for (int slot = 0; slot < MAX_WEAPONSLOTS; ++slot)
98 {
99 .entity weaponentity = weaponentities[slot];
100
101 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)))
102 {
103 float xyspeed = vlen(vec2(player.velocity));
104 // add a maximum of charge_velocity_rate when going fast (f = 1), gradually increasing from minspeed (f = 0) to maxspeed
105 xyspeed = min(xyspeed, WEP_CVAR(WEP_VORTEX, charge_maxspeed));
106 float f = (xyspeed - WEP_CVAR(WEP_VORTEX, charge_minspeed)) / (WEP_CVAR(WEP_VORTEX, charge_maxspeed) - WEP_CVAR(WEP_VORTEX, charge_minspeed));
107 // add the extra charge
108 player.(weaponentity).vortex_charge = min(1, player.(weaponentity).vortex_charge + WEP_CVAR(WEP_VORTEX, charge_velocity_rate) * f * PHYS_INPUT_TIMELENGTH);
109 }
110 }
111}
112
113void W_Vortex_Attack(Weapon thiswep, entity actor, .entity weaponentity, bool is_secondary)
114{
115 float mydmg = WEP_CVAR_BOTH(WEP_VORTEX, !is_secondary, damage);
116 float myforce = WEP_CVAR_BOTH(WEP_VORTEX, !is_secondary, force);
117
118 float dtype = thiswep.m_id;
119 if (WEP_CVAR_BOTH(WEP_VORTEX, !is_secondary, armorpierce))
120 dtype |= HITTYPE_ARMORPIERCE;
121
122 float flying = IsFlying(actor); // do this BEFORE to make the trace values from FireRailgunBullet last
123
124 float charge;
125 if (WEP_CVAR(WEP_VORTEX, charge))
126 {
127 charge = WEP_CVAR(WEP_VORTEX, charge_mindmg) / mydmg + (1 - WEP_CVAR(WEP_VORTEX, charge_mindmg) / mydmg) * actor.(weaponentity).vortex_charge;
128 actor.(weaponentity).vortex_charge *= WEP_CVAR(WEP_VORTEX, charge_shot_multiplier); // do this AFTER setting mydmg/myforce
129 // O RLY? -- divVerent
130 // YA RLY -- FruitieX
131 }
132 else
133 charge = 1;
134 mydmg *= charge;
135 myforce *= charge;
136
137 W_SetupShot(actor, weaponentity, true, 5, SND_VORTEX_FIRE, CH_WEAPON_A, mydmg, dtype);
138 if (WEP_CVAR(WEP_VORTEX, charge_animlimit) && charge > WEP_CVAR(WEP_VORTEX, charge_animlimit)) // if the Vortex is overcharged, we play an extra sound
139 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);
140
141 yoda = 0;
142 impressive_hits = 0;
144 mydmg,
145 false,
146 myforce,
147 WEP_CVAR_BOTH(WEP_VORTEX, !is_secondary, damagefalloff_mindist),
148 WEP_CVAR_BOTH(WEP_VORTEX, !is_secondary, damagefalloff_maxdist),
149 WEP_CVAR_BOTH(WEP_VORTEX, !is_secondary, damagefalloff_halflife),
150 WEP_CVAR_BOTH(WEP_VORTEX, !is_secondary, damagefalloff_forcehalflife),
151 dtype
152 );
153
154 if (yoda && flying)
155 Send_Notification(NOTIF_ONE, actor, MSG_ANNCE, ANNCE_ACHIEVEMENT_YODA);
156 if (impressive_hits && actor.vortex_lasthit)
157 {
158 Send_Notification(NOTIF_ONE, actor, MSG_ANNCE, ANNCE_ACHIEVEMENT_IMPRESSIVE);
159 impressive_hits = 0; // only every second time
160 }
161
162 actor.vortex_lasthit = impressive_hits;
163
164 //beam done on client
166 W_MuzzleFlash(thiswep, actor, weaponentity, w_shotorg, normalize(v - w_shotorg));
167 SendCSQCVortexBeamParticle(actor, charge);
168
169 W_DecreaseAmmo(thiswep, actor, WEP_CVAR_BOTH(WEP_VORTEX, !is_secondary, ammo), weaponentity);
170}
171
173
174void W_Vortex_Charge(entity actor, .entity weaponentity, float dt)
175{
176 if (WEP_CVAR(WEP_VORTEX, charge) && actor.(weaponentity).vortex_charge < WEP_CVAR(WEP_VORTEX, charge_limit))
177 actor.(weaponentity).vortex_charge = min(1, actor.(weaponentity).vortex_charge + WEP_CVAR(WEP_VORTEX, charge_rate) * dt);
178}
179
180METHOD(Vortex, wr_aim, void(entity thiswep, entity actor, .entity weaponentity))
181{
182 if (bot_aim(actor, weaponentity, 1000000, 0, 1, false, true))
183 PHYS_INPUT_BUTTON_ATCK(actor) = true;
184}
185METHOD(Vortex, wr_think, void(entity thiswep, entity actor, .entity weaponentity, int fire))
186{
187 if (!WEP_CVAR(WEP_VORTEX, charge_always))
188 W_Vortex_Charge(actor, weaponentity, frametime / W_TICSPERFRAME);
189
190 if (WEP_CVAR_SEC(WEP_VORTEX, chargepool)
191 && actor.(weaponentity).vortex_chargepool_ammo < 1)
192 {
193 if (actor.vortex_chargepool_pauseregen_finished < time)
194 actor.(weaponentity).vortex_chargepool_ammo = min(1, actor.(weaponentity).vortex_chargepool_ammo + WEP_CVAR_SEC(WEP_VORTEX, chargepool_regen) * frametime / W_TICSPERFRAME);
195 actor.pauseregen_finished = max(actor.pauseregen_finished, time + WEP_CVAR_SEC(WEP_VORTEX, chargepool_pause_regen));
196 }
197
198 if (autocvar_g_balance_vortex_reload_ammo && actor.(weaponentity).clip_load < min(WEP_CVAR_PRI(WEP_VORTEX, ammo), WEP_CVAR_SEC(WEP_VORTEX, ammo)))
199 { // forced reload
200 thiswep.wr_reload(thiswep, actor, weaponentity);
201 return;
202 }
203
204 if (fire & 1)
205 {
206 if (weapon_prepareattack(thiswep, actor, weaponentity, false, WEP_CVAR_PRI(WEP_VORTEX, refire)))
207 {
208 W_Vortex_Attack(thiswep, actor, weaponentity, false);
209 weapon_thinkf(actor, weaponentity, WFRAME_FIRE1, WEP_CVAR_PRI(WEP_VORTEX, animtime), w_ready);
210 }
211 }
212 if ((WEP_CVAR(WEP_VORTEX, charge) && !WEP_CVAR(WEP_VORTEX, secondary)) ? (PHYS_INPUT_BUTTON_ZOOM(actor) | PHYS_INPUT_BUTTON_ZOOMSCRIPT(actor)) : (fire & 2))
213 {
214 if (WEP_CVAR(WEP_VORTEX, charge))
215 {
216 actor.(weaponentity).vortex_charge_rottime = time + WEP_CVAR(WEP_VORTEX, charge_rot_pause);
217 float dt = frametime / W_TICSPERFRAME;
218
219 if (actor.(weaponentity).vortex_charge < 1)
220 {
221 if (WEP_CVAR_SEC(WEP_VORTEX, chargepool))
222 {
223 if (WEP_CVAR_SEC(WEP_VORTEX, ammo))
224 {
225 // always deplete if secondary is held
226 actor.(weaponentity).vortex_chargepool_ammo = max(0, actor.(weaponentity).vortex_chargepool_ammo - WEP_CVAR_SEC(WEP_VORTEX, ammo) * dt);
227
228 dt = min(dt, (1 - actor.(weaponentity).vortex_charge) / WEP_CVAR(WEP_VORTEX, charge_rate));
229 actor.vortex_chargepool_pauseregen_finished = time + WEP_CVAR_SEC(WEP_VORTEX, chargepool_pause_regen);
230 dt = bound(0, dt, actor.(weaponentity).vortex_chargepool_ammo);
231
232 actor.(weaponentity).vortex_charge += dt * WEP_CVAR(WEP_VORTEX, charge_rate);
233 }
234 }
235 else if (WEP_CVAR_SEC(WEP_VORTEX, ammo))
236 {
237 if (fire & 2) // only eat ammo when the button is pressed
238 {
239 dt = min(dt, (1 - actor.(weaponentity).vortex_charge) / WEP_CVAR(WEP_VORTEX, charge_rate));
240 if (!(actor.items & IT_UNLIMITED_AMMO))
241 {
242 // if this weapon is reloadable, decrease its load. Else decrease the player's ammo
243 if (autocvar_g_balance_vortex_reload_ammo)
244 {
245 dt = bound(0, dt, (actor.(weaponentity).clip_load - WEP_CVAR_PRI(WEP_VORTEX, ammo)) / WEP_CVAR_SEC(WEP_VORTEX, ammo));
246 if (dt > 0)
247 actor.(weaponentity).clip_load = max(WEP_CVAR_SEC(WEP_VORTEX, ammo), actor.(weaponentity).clip_load - WEP_CVAR_SEC(WEP_VORTEX, ammo) * dt);
248 actor.(weaponentity).(weapon_load[thiswep.m_id]) = actor.(weaponentity).clip_load;
249 }
250 else
251 {
252 dt = bound(0, dt, (GetResource(actor, thiswep.ammo_type) - WEP_CVAR_PRI(WEP_VORTEX, ammo)) / WEP_CVAR_SEC(WEP_VORTEX, ammo));
253 if (dt > 0)
254 SetResource(actor, thiswep.ammo_type, max(WEP_CVAR_SEC(WEP_VORTEX, ammo), GetResource(actor, thiswep.ammo_type) - WEP_CVAR_SEC(WEP_VORTEX, ammo) * dt));
255 }
256 }
257 actor.(weaponentity).vortex_charge += dt * WEP_CVAR(WEP_VORTEX, charge_rate);
258 }
259 }
260 else
261 {
262 dt = min(dt, (1 - actor.(weaponentity).vortex_charge) / WEP_CVAR(WEP_VORTEX, charge_rate));
263 actor.(weaponentity).vortex_charge += dt * WEP_CVAR(WEP_VORTEX, charge_rate);
264 }
265 }
266 }
267 else if (WEP_CVAR(WEP_VORTEX, secondary))
268 {
269 if (weapon_prepareattack(thiswep, actor, weaponentity, false, WEP_CVAR_SEC(WEP_VORTEX, refire)))
270 {
271 W_Vortex_Attack(thiswep, actor, weaponentity, true);
272 weapon_thinkf(actor, weaponentity, WFRAME_FIRE1, WEP_CVAR_SEC(WEP_VORTEX, animtime), w_ready);
273 }
274 }
275 }
276}
277METHOD(Vortex, wr_setup, void(entity thiswep, entity actor, .entity weaponentity))
278{
279 actor.vortex_lasthit = 0;
280}
281METHOD(Vortex, wr_checkammo1, bool(entity thiswep, entity actor, .entity weaponentity))
282{
283 float ammo_amount = GetResource(actor, thiswep.ammo_type) >= WEP_CVAR_PRI(WEP_VORTEX, ammo);
284 ammo_amount += (autocvar_g_balance_vortex_reload_ammo && actor.(weaponentity).(weapon_load[thiswep.m_id]) >= WEP_CVAR_PRI(WEP_VORTEX, ammo));
285 return ammo_amount;
286}
287METHOD(Vortex, wr_checkammo2, bool(entity thiswep, entity actor, .entity weaponentity))
288{
289 if (WEP_CVAR(WEP_VORTEX, secondary))
290 {
291 // don't allow charging if we don't have enough ammo
292 float ammo_amount = GetResource(actor, thiswep.ammo_type) >= WEP_CVAR_SEC(WEP_VORTEX, ammo);
293 ammo_amount += actor.(weaponentity).(weapon_load[thiswep.m_id]) >= WEP_CVAR_SEC(WEP_VORTEX, ammo);
294 return ammo_amount;
295 }
296 else
297 return false; // zoom is not a fire mode
298}
299METHOD(Vortex, wr_resetplayer, void(entity thiswep, entity actor))
300{
301 if (WEP_CVAR(WEP_VORTEX, charge))
302 for (int slot = 0; slot < MAX_WEAPONSLOTS; ++slot)
303 {
304 .entity weaponentity = weaponentities[slot];
305 actor.(weaponentity).vortex_charge = WEP_CVAR(WEP_VORTEX, charge_start);
306
307 if (WEP_CVAR_SEC(WEP_VORTEX, chargepool))
308 actor.(weaponentity).vortex_chargepool_ammo = 1;
309 }
310 actor.vortex_lasthit = 0;
311}
312METHOD(Vortex, wr_reload, void(entity thiswep, entity actor, .entity weaponentity))
313{
314 W_Reload(actor, weaponentity, min(WEP_CVAR_PRI(WEP_VORTEX, ammo), WEP_CVAR_SEC(WEP_VORTEX, ammo)), SND_RELOAD);
315}
316METHOD(Vortex, wr_suicidemessage, Notification(entity thiswep))
317{
318 return WEAPON_THINKING_WITH_PORTALS;
319}
320METHOD(Vortex, wr_killmessage, Notification(entity thiswep))
321{
322 return WEAPON_VORTEX_MURDER;
323}
324METHOD(Vortex, wr_zoom, bool(entity thiswep, entity actor))
325{
326 return PHYS_INPUT_BUTTON_ATCK2(actor) && !WEP_CVAR(WEP_VORTEX, secondary);
327}
328
329#endif // SVQC
330#ifdef CSQC
331
332METHOD(Vortex, wr_impacteffect, void(entity thiswep, entity actor))
333{
334 entity this = actor;
335 vector org2 = w_org + w_backoff * 2;
336 bool usecolor = ((teamplay && autocvar_cl_tracers_teamcolor == 1) || autocvar_cl_tracers_teamcolor == 2);
337 boxparticles(particleeffectnum(EFFECT_VORTEX_IMPACT), NULL, org2, org2, '0 0 0', '0 0 0', 1, (usecolor ? PARTICLES_USECOLOR : 0));
338 if (!w_issilent)
339 sound(this, CH_SHOTS, SND_VORTEX_IMPACT, VOL_BASE, ATTN_NORM);
340}
341METHOD(Vortex, wr_init, void(entity thiswep))
342{
344 precache_pic(thiswep.w_reticle);
345}
346METHOD(Vortex, wr_zoom, bool(entity thiswep, entity actor))
347{
348 if (button_zoom || zoomscript_caught || (!WEP_CVAR(WEP_VORTEX, secondary) && button_attack2))
349 return true;
350 else // no weapon specific image for this weapon
351 return false;
352}
353METHOD(Vortex, wr_zoomdir, bool(entity thiswep))
354{
355 return button_attack2 && !WEP_CVAR(WEP_VORTEX, secondary);
356}
357
358#endif // CSQC
359#ifdef MENUQC
361#include "rifle.qh"
362
363METHOD(Vortex, describe, string(Vortex this))
364{
365 TC(Vortex, this);
367 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));
368 PAR(_("The secondary fire zooms in when held, allowing for ease of aiming."));
369 PAR(_("It consumes %s ammo for each shot."), COLORED_NAME(ITEM_Cells)); // shared string
370 PAR(_("Unlike the %s, the %s doesn't need to be reloaded manually, although you have to wait a couple seconds between shots. "
371 "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));
372 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));
373 PAR(W_Guide_Keybinds(this));
374 PAR(W_Guide_DPS_onlyOne(this.netname, "primary"));
375 return PAGE_TEXT;
376}
377
378#endif // MENUQC
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:42
int m_id
Definition weapon.qh:43
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:843
#define PHYS_INPUT_TIMELENGTH
Definition player.qh:253
#define PHYS_INPUT_BUTTON_ZOOMSCRIPT(s)
Definition player.qh:163
#define PHYS_INPUT_BUTTON_ATCK(s)
Definition player.qh:152
#define PHYS_INPUT_BUTTON_ZOOM(s)
Definition player.qh:155
#define PHYS_INPUT_BUTTON_ATCK2(s)
Definition player.qh:154
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:350
#define WriteHeader(to, id)
Definition net.qh:265
int ReadByte()
#define REGISTER_NET_TEMP(id)
Definition net.qh:31
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:544
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:1762
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:642
#define PAR(...)
Adds an individually translatable paragraph to PAGE_TEXT without having to deal with strcat and sprin...
Definition string.qh:648
#define PAGE_TEXT_INIT()
Definition string.qh:641
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:231
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 SendCSQCVortexBeamParticle(entity player, float charge)
Definition vortex.qc:37
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:174
float vortex_chargepool_pauseregen_finished
Definition vortex.qc:172
void W_Vortex_Attack(Weapon thiswep, entity actor,.entity weaponentity, bool is_secondary)
Definition vortex.qc:113
float vortex_charge_rottime
Definition vortex.qh:92
bool autocvar_cl_particles_oldvortexbeam
Definition vortex.qh:88
string W_Guide_Keybinds(Weapon wep)
Definition all.qc:824
void W_MuzzleFlash(Weapon thiswep, entity actor,.entity weaponentity, vector shotorg, vector shotdir)
Definition all.qc:715
string W_Guide_DPS_onlyOne(string name, string fire)
Definition all.qc:914
#define WEP_CVAR_PRI(wep, name)
Definition all.qh:338
#define WEP_CVAR_BOTH(wep, isprimary, name)
Definition all.qh:340
#define WEP_CVAR(wep, name)
Definition all.qh:337
#define WEP_CVAR_SEC(wep, name)
Definition all.qh:339
const int MAX_WEAPONSLOTS
Definition weapon.qh:16
int max_shot_distance
Definition weapon.qh:245
entity weaponentities[MAX_WEAPONSLOTS]
Definition weapon.qh:17
int autocvar_cl_tracers_teamcolor
Definition weapon.qh:249
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