Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
hook.qc
Go to the documentation of this file.
1#include "hook.qh"
2
3#ifdef SVQC
4
5const float HOOK_SECONDARY_DELAY = 0.0625; // (1/16) exact multiple of default frametime 0.015625 (1/64)
7{
8 // NOTE: W_Electro_ExplodeComboThink uses similar code, please keep them in sync
9 float dt = time - this.teleport_time;
10
11 float dmg_remaining_next = bound(0, 1 - dt / WEP_CVAR_SEC(WEP_HOOK, duration), 1) ** WEP_CVAR_SEC(WEP_HOOK, power);
12
13 float f = this.dmg_last - dmg_remaining_next;
14 this.dmg_last = dmg_remaining_next;
15
16 RadiusDamage(this, this.realowner,
17 f * WEP_CVAR_SEC(WEP_HOOK, damage),
18 f * WEP_CVAR_SEC(WEP_HOOK, edgedamage),
19 WEP_CVAR_SEC(WEP_HOOK, radius),
20 this.realowner,
21 NULL,
22 f * WEP_CVAR_SEC(WEP_HOOK, force),
25 NULL
26 );
28
29 if (dt < WEP_CVAR_SEC(WEP_HOOK, duration))
31 else
32 delete(this);
33}
34
36{
37 this.event_damage = func_null;
38 settouch(this, func_null);
39 this.effects |= EF_NODRAW;
40
43 this.teleport_time = time;
44 this.dmg_last = 1;
46}
47
48void W_Hook_Explode2_use(entity this, entity actor, entity trigger)
49{
50 W_Hook_Explode2(this);
51}
52
53void W_Hook_Damage(entity this, entity inflictor, entity attacker, float damage, int deathtype, .entity weaponentity, vector hitloc, vector force)
54{
55 if (GetResource(this, RES_HEALTH) <= 0)
56 return;
57 if (!W_CheckProjectileDamage(inflictor.realowner, this.realowner, deathtype, -1)) // no exceptions
58 return; // g_projectiles_damage says to halt
59
60 SetResourceExplicit(this, RES_HEALTH, GetResource(this, RES_HEALTH));
61
62 if (GetResource(this, RES_HEALTH) <= 0)
64}
65
67{
69 this.use(this, NULL, NULL);
70}
71
72void W_Hook_Attack2(Weapon thiswep, entity actor, .entity weaponentity)
73{
74 //W_DecreaseAmmo(thiswep, actor, WEP_CVAR_SEC(WEP_HOOK, ammo)); // WEAPONTODO: Figure out how to handle ammo with hook secondary (gravitybomb)
75 W_SetupShot(actor, weaponentity, false, 4, SND_HOOKBOMB_FIRE, CH_WEAPON_A, WEP_CVAR_SEC(WEP_HOOK, damage), WEP_HOOK.m_id | HITTYPE_SECONDARY);
76
77 entity gren = new(hookbomb);
78 gren.owner = gren.realowner = actor;
79 gren.bot_dodge = true;
80 gren.bot_dodgerating = WEP_CVAR_SEC(WEP_HOOK, damage);
83 gren.projectiledeathtype = WEP_HOOK.m_id | HITTYPE_SECONDARY;
84 gren.weaponentity_fld = weaponentity;
85 setorigin(gren, w_shotorg);
86 setsize(gren, '0 0 0', '0 0 0');
87
88 gren.nextthink = time + WEP_CVAR_SEC(WEP_HOOK, lifetime);
90 gren.use = W_Hook_Explode2_use;
92
93 gren.takedamage = DAMAGE_YES;
94 SetResourceExplicit(gren, RES_HEALTH, WEP_CVAR_SEC(WEP_HOOK, health));
95 gren.damageforcescale = WEP_CVAR_SEC(WEP_HOOK, damageforcescale);
96 gren.event_damage = W_Hook_Damage;
97 gren.damagedbycontents = true;
99 gren.missile_flags = MIF_SPLASH | MIF_ARC;
100
101 gren.velocity = '0 0 1' * WEP_CVAR_SEC(WEP_HOOK, speed);
103 gren.velocity += actor.velocity;
104
105 gren.gravity = WEP_CVAR_SEC(WEP_HOOK, gravity);
106 //W_SetupProjVelocity_Basic(gren); // just falling down!
107
108 gren.angles = '0 0 0';
109 gren.flags = FL_PROJECTILE;
110 IL_PUSH(g_projectiles, gren);
111 IL_PUSH(g_bot_dodge, gren);
112
113 CSQCProjectile(gren, true, PROJECTILE_HOOKBOMB, true);
114
115 MUTATOR_CALLHOOK(EditProjectile, actor, gren);
116}
117
118METHOD(Hook, wr_think, void(entity thiswep, entity actor, .entity weaponentity, int fire))
119{
120 if (fire & 1)
121 {
122 if (!actor.(weaponentity).hook
123 && !(actor.(weaponentity).hook_state & HOOK_WAITING_FOR_RELEASE)
124 && actor.(weaponentity).hook_refire < time
125 && weapon_prepareattack(thiswep, actor, weaponentity, false, -1))
126 {
127 W_DecreaseAmmo(thiswep, actor, thiswep.ammo_factor * WEP_CVAR_PRI(WEP_HOOK, ammo), weaponentity);
128 actor.(weaponentity).hook_state |= HOOK_FIRING;
129 actor.(weaponentity).hook_state |= HOOK_WAITING_FOR_RELEASE;
130 weapon_thinkf(actor, weaponentity, WFRAME_FIRE1, WEP_CVAR_PRI(WEP_HOOK, animtime), w_ready);
131 }
132 }
133 else
134 {
135 actor.(weaponentity).hook_state |= HOOK_REMOVING;
136 actor.(weaponentity).hook_state &= ~HOOK_WAITING_FOR_RELEASE;
137 }
138
139 if (fire & 2)
140 if (weapon_prepareattack(thiswep, actor, weaponentity, true, WEP_CVAR_SEC(WEP_HOOK, refire)))
141 {
142 W_Hook_Attack2(thiswep, actor, weaponentity);
143 weapon_thinkf(actor, weaponentity, WFRAME_FIRE2, WEP_CVAR_SEC(WEP_HOOK, animtime), w_ready);
144 }
145
146 if (actor.(weaponentity).hook)
147 {
148 // if hooked, no bombs, and increase the timer
149 actor.(weaponentity).hook_refire = max(actor.(weaponentity).hook_refire, time + WEP_CVAR_PRI(WEP_HOOK, refire) * W_WeaponRateFactor(actor));
150
151 // hook also inhibits health regeneration, but only for 1 second
152 if (!(actor.items & IT_UNLIMITED_AMMO))
153 actor.pauseregen_finished = max(actor.pauseregen_finished, time + autocvar_g_balance_pause_fuel_regen);
154 }
155
156 if (actor.(weaponentity).hook && actor.(weaponentity).hook.state == 1)
157 {
158 float hooked_time_max = WEP_CVAR_PRI(WEP_HOOK, hooked_time_max);
159 if (hooked_time_max > 0 && time > actor.(weaponentity).hook_time_hooked + hooked_time_max)
160 actor.(weaponentity).hook_state |= HOOK_REMOVING;
161
162 float hooked_fuel = thiswep.ammo_factor * WEP_CVAR_PRI(WEP_HOOK, hooked_ammo);
163 if (hooked_fuel > 0
164 && time > actor.(weaponentity).hook_time_fueldecrease
165 && !(actor.items & IT_UNLIMITED_AMMO))
166 {
167 if (GetResource(actor, RES_FUEL) >= (time - actor.(weaponentity).hook_time_fueldecrease) * hooked_fuel)
168 {
169 W_DecreaseAmmo(thiswep, actor, (time - actor.(weaponentity).hook_time_fueldecrease) * hooked_fuel, weaponentity);
170 actor.(weaponentity).hook_time_fueldecrease = time;
171 // decrease next frame again
172 }
173 else
174 {
175 SetResource(actor, RES_FUEL, 0);
176 actor.(weaponentity).hook_state |= HOOK_REMOVING;
177 if (actor.(weaponentity).m_weapon != WEP_Null) // offhand
178 W_SwitchWeapon_Force(actor, w_getbestweapon(actor, weaponentity), weaponentity);
179 }
180 }
181 }
182 else
183 {
184 actor.(weaponentity).hook_time_hooked = time;
185 actor.(weaponentity).hook_time_fueldecrease = time + WEP_CVAR_PRI(WEP_HOOK, hooked_time_free);
186 }
187
188 actor.(weaponentity).hook_state = BITSET(actor.(weaponentity).hook_state, HOOK_PULLING, (!PHYS_INPUT_BUTTON_CROUCH(actor) || !autocvar_g_balance_grapplehook_crouchslide));
189
190 if (actor.(weaponentity).hook_state & HOOK_FIRING)
191 {
192 if (actor.(weaponentity).hook)
193 RemoveHook(actor.(weaponentity).hook);
194 FireGrapplingHook(actor, weaponentity);
195 actor.(weaponentity).hook_state &= ~HOOK_FIRING;
196 actor.(weaponentity).hook_refire = max(actor.(weaponentity).hook_refire, time + autocvar_g_balance_grapplehook_refire * W_WeaponRateFactor(actor));
197 }
198 else if (actor.(weaponentity).hook_state & HOOK_REMOVING)
199 {
200 if (actor.(weaponentity).hook)
201 RemoveHook(actor.(weaponentity).hook);
202 actor.(weaponentity).hook_state &= ~HOOK_REMOVING;
203 }
204}
205
206METHOD(Hook, wr_setup, void(entity thiswep, entity actor, .entity weaponentity))
207{
208 actor.(weaponentity).hook_state &= ~HOOK_WAITING_FOR_RELEASE;
209}
210
211METHOD(Hook, wr_checkammo1, bool(Hook thiswep, entity actor, .entity weaponentity))
212{
213 if (!thiswep.ammo_factor)
214 return true;
215 if (actor.(weaponentity).hook)
216 return GetResource(actor, RES_FUEL) > 0;
217
218 return GetResource(actor, RES_FUEL) >= WEP_CVAR_PRI(WEP_HOOK, ammo);
219}
220
221METHOD(Hook, wr_checkammo2, bool(Hook thiswep, entity actor, .entity weaponentity))
222{
223 // infinite ammo for now
224 return true; // actor.ammo_cells >= WEP_CVAR_SEC(WEP_HOOK, ammo); // WEAPONTODO: see above
225}
226
227METHOD(Hook, wr_resetplayer, void(entity thiswep, entity actor))
228{
230 for (int slot = 0; slot < MAX_WEAPONSLOTS; ++slot)
231 {
232 .entity weaponentity = weaponentities[slot];
233 actor.(weaponentity).hook_time = 0;
234 actor.(weaponentity).hook_refire = time;
235 }
236}
237
238METHOD(Hook, wr_killmessage, Notification(entity thiswep))
239{
240 return WEAPON_HOOK_MURDER;
241}
242
243#endif // SVQC
244#ifdef CSQC
245
246METHOD(Hook, wr_impacteffect, void(entity thiswep, entity actor))
247{
248 // the hook bomb uses a negative w_backoff factor because it explodes slightly below the floor, unlike other projectiles
249 vector org2 = w_org + w_backoff * -2;
250 pointparticles(EFFECT_HOOK_EXPLODE, org2, '0 0 0', 1);
251 if (!w_issilent)
252 sound(actor, CH_SHOTS, SND_HOOKBOMB_IMPACT, VOL_BASE, ATTN_NORM);
253}
254
256#include <lib/warpzone/common.qh>
257
259
260void Draw_CylindricLine(vector from, vector to, float thickness, string texture, float aspect, float shift, vector rgb, float theAlpha, float drawflag, vector vieworg);
261
264classfield(Hook) .vector velocity;
265classfield(Hook) .float HookSilent;
266classfield(Hook) .float HookRange;
267
279
282{
283 vector a, b;
284 string tex;
285
286 if (this.teleport_time && time > this.teleport_time)
287 {
288 sound(this, CH_SHOTS_SINGLE, SND_Null, VOL_BASE, ATTEN_NORM); // safeguard
289 this.teleport_time = 0;
290 }
291
293
294 int s = W_GunAlign(viewmodels[this.cnt], STAT(GUNALIGN)) - 1;
295 vector vs = hook_shotorigin[s];
296
297 if (this.owner.sv_entnum == player_localentnum - 1)
298 {
300 a = csqcplayer.origin + csqcplayer.view_ofs;
301 else
302 a = view_origin + view_forward * vs.x + view_right * -vs.y + view_up * vs.z;
303 b = this.origin;
304 }
305 else
306 {
307 a = this.velocity;
308 b = this.origin;
309 }
310
311 int t = entcs_GetTeamColor(this.owner.sv_entnum);
312
313 float intensity = autocvar_cl_grapplehook_alpha;
314 float offset = 0;
315 vector rgb = colormapPaletteColor(entcs_GetClientColors(this.sv_entnum - 1) & 0x0F, true);
316 switch (t)
317 {
318 case NUM_TEAM_1: tex = "particles/hook_red"; break;
319 case NUM_TEAM_2: tex = "particles/hook_blue"; break;
320 case NUM_TEAM_3: tex = "particles/hook_yellow"; break;
321 case NUM_TEAM_4: tex = "particles/hook_pink"; break;
322 default: tex = "particles/hook_white"; break;
323 }
324
325 MUTATOR_CALLHOOK(DrawGrapplingHook, this, tex, rgb, t);
326 tex = M_ARGV(1, string);
327 rgb = M_ARGV(2, vector);
328
335
337
338 if (vdist(trace_endpos - atrans, >, 0.5))
339 {
340 setorigin(this, trace_endpos); // hook endpoint!
341 this.angles = vectoangles(trace_endpos - atrans);
342 this.drawmask = MASK_NORMAL;
343 }
344 else
345 this.drawmask = 0;
346}
347
349{
350 sound(this, CH_SHOTS_SINGLE, SND_Null, VOL_BASE, ATTEN_NORM);
351
352 for (int slot = 0; slot < MAX_WEAPONSLOTS; ++slot)
353 {
354 entity wep = viewmodels[slot];
355 if (wep.hook == this)
356 wep.hook = NULL;
357 }
358}
359
360NET_HANDLE(ENT_CLIENT_HOOK, bool isNew)
361{
362 int sf = ReadByte();
363
364 this.HookSilent = sf & 0x80;
366
368
369 if (sf & 1)
370 {
371 this.sv_entnum = ReadByte();
372 int slot = ReadByte();
373 this.owner = playerslots[this.sv_entnum - 1];
374 if (this.sv_entnum == player_localentnum)
375 viewmodels[slot].hook = this;
376 this.cnt = slot;
377 this.HookRange = 0;
378 }
379 if (sf & 2)
380 {
381 this.origin = ReadVector();
382 setorigin(this, this.origin);
383 }
384 if (sf & 4)
385 this.velocity = ReadVector();
386
388
389 if (isNew || !this.teleport_time)
390 {
391 this.draw = Draw_GrapplingHook;
392 if (!IL_CONTAINS(g_drawables, this))
393 IL_PUSH(g_drawables, this);
394 this.entremove = Remove_GrapplingHook;
395
396 setmodel(this, MDL_HOOK);
397 this.drawmask = MASK_NORMAL;
398 }
399
400 this.teleport_time = time + 10;
401 return true;
402}
403
404// TODO: hook: temporarily transform this.origin for drawing the model along warpzones!
405#endif // CSQC
406#ifdef MENUQC
409
410METHOD(Hook, describe, string(Hook this))
411{
412 TC(Hook, this);
414 PAR(_("The %s is a unique weapon, firing a chain forwards which pulls you in once it latches onto something."), COLORED_NAME(this));
415 PAR(_("The secondary fire usually drops a gravity bomb that affects enemies, also releasing light and smoke sort of like a flashbang."));
416 PAR(_("It usually requires %s ammo to work, consuming it both when initially firing the hook, and after a couple seconds as it reels you in."), COLORED_NAME(ITEM_Fuel));
417 PAR(_("The %s allows reaching previously unreachable places on maps and zooming around the map at high speeds, "
418 "making both surprise ambushes and miraculous escapes possible."), COLORED_NAME(this));
419 PAR(_("It isn't available very often on maps, unless the %s mutator is active, in which all players have it on their offhand, used with %s."), COLORED_NAME(MUTATOR_hook), strcat("^3", _("hook"), "^7"));
420 PAR(W_Guide_Keybinds(this));
421 PAR(W_Guide_DPS_onlySecondary(this.netname, "secondary"));
422 return PAGE_TEXT;
423}
424
425#endif // MENUQC
IntrusiveList g_bot_dodge
Definition api.qh:150
#define MUTATOR_CALLHOOK(id,...)
Definition base.qh:143
#define BITSET(var, mask, flag)
Definition bits.qh:11
int W_GunAlign(entity this, int preferred_align)
var entity(vector mins, vector maxs,.entity tofield) findbox_tofield_OrFallback
entity csqcplayer
Definition cl_player.qh:26
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.
Definition hook.qh:15
float ammo_factor
Definition hook.qh:37
fields which are explicitly/manually set are marked with "M", fields set automatically are marked wit...
Definition weapon.qh:42
string netname
Definition powerups.qc:20
float lifetime
Definition powerups.qc:23
float cnt
Definition powerups.qc:24
float gravity
Definition items.qh:17
entity playerslots[255]
Definition main.qh:84
IntrusiveList g_drawables
Definition main.qh:91
vector view_origin
Definition main.qh:109
entity owner
Definition main.qh:87
int sv_entnum
Definition main.qh:186
vector view_up
Definition main.qh:109
vector hook_shotorigin[4]
Definition main.qh:205
vector view_right
Definition main.qh:109
vector view_forward
Definition main.qh:109
#define colormapPaletteColor(c, isPants)
Definition color.qh:5
#define COLORED_NAME(this)
Definition color.qh:189
const int IT_UNLIMITED_AMMO
Definition item.qh:23
float radius
Definition impulse.qh:11
#define setmodel(this, m)
Definition model.qh:26
#define M_ARGV(x, type)
Definition events.qh:17
#define PHYS_INPUT_BUTTON_CROUCH(s)
Definition player.qh:156
float teleport_time
Definition player.qh:218
float W_WeaponRateFactor(entity this)
const float HOOK_SECONDARY_DELAY
Definition hook.qc:5
void Draw_GrapplingHook(entity this)
Definition hook.qc:281
void W_Hook_Explode2(entity this)
Definition hook.qc:35
void W_Hook_Damage(entity this, entity inflictor, entity attacker, float damage, int deathtype,.entity weaponentity, vector hitloc, vector force)
Definition hook.qc:53
string Draw_GrapplingHook_trace_callback_tex
Definition hook.qc:268
void W_Hook_Explode2_use(entity this, entity actor, entity trigger)
Definition hook.qc:48
float Draw_GrapplingHook_trace_callback_a
Definition hook.qc:271
void Draw_GrapplingHook_trace_callback(vector start, vector hit, vector end)
Definition hook.qc:272
void Remove_GrapplingHook(entity this)
Definition hook.qc:348
vector Draw_GrapplingHook_trace_callback_rgb
Definition hook.qc:270
float autocvar_cl_grapplehook_alpha
Definition hook.qc:258
void Draw_CylindricLine(vector from, vector to, float thickness, string texture, float aspect, float shift, vector rgb, float theAlpha, float drawflag, vector vieworg)
Definition draw.qh:10
void W_Hook_ExplodeThink(entity this)
Definition hook.qc:6
float Draw_GrapplingHook_trace_callback_rnd
Definition hook.qc:269
void W_Hook_Attack2(Weapon thiswep, entity actor,.entity weaponentity)
Definition hook.qc:72
void W_Hook_Touch2(entity this, entity toucher)
Definition hook.qc:66
float hook_refire
Definition hook.qh:91
float hook_time_fueldecrease
Definition hook.qh:93
float hook_time_hooked
Definition hook.qh:92
const int FL_PROJECTILE
Definition constants.qh:76
const float DRAWFLAG_NORMAL
float drawmask
const float MASK_NORMAL
vector velocity
float effects
float time
vector trace_endpos
float nextthink
float player_localentnum
vector origin
const float ATTN_NORM
const float EF_NODRAW
#define use
void CSQCProjectile(entity e, float clientanimate, int type, float docull)
float RadiusDamage(entity inflictor, entity attacker, float coredamage, float edgedamage, float rad, entity cantbe, entity mustbe, float forceintensity, int deathtype,.entity weaponentity, entity directhitentity)
Definition damage.qc:934
IntrusiveList g_damagedbycontents
Definition damage.qh:143
void W_SwitchWeapon_Force(Player this, Weapon w,.entity weaponentity)
Definition selection.qc:237
vector w_org
float damageforcescale
vector w_backoff
float w_issilent
const int HITTYPE_SPAM
set manually after first RadiusDamage, stops effect spam
Definition all.qh:36
const int HITTYPE_SECONDARY
Definition all.qh:31
float speed
Definition dynlight.qc:9
#define pointparticles(effect, org, vel, howmany)
Definition effect.qh:7
float dmg_last
Definition electro.qh:101
ent angles
Definition ent_cs.qc:146
SetResourceExplicit(ent, RES_ARMOR, ReadByte() *DEC_FACTOR)) ENTCS_PROP(NAME
int entcs_GetTeamColor(int i)
Definition ent_cs.qh:121
int entcs_GetClientColors(int i)
Definition ent_cs.qh:111
void InterpolateOrigin_Undo(entity this)
snap origin to iorigin2 (actual origin)
void InterpolateOrigin_Note(entity this)
void InterpolateOrigin_Do(entity this)
set origin based on iorigin1 (old pos), iorigin2 (desired pos), and time
const int IFLAG_VELOCITY
const int IFLAG_ORIGIN
int iflags
ERASEABLE entity IL_PUSH(IntrusiveList this, entity it)
Push to tail.
ERASEABLE bool IL_CONTAINS(IntrusiveList this, entity it)
#define TC(T, sym)
Definition _all.inc:82
#define NET_HANDLE(id, param)
Definition net.qh:15
#define ReadVector()
Definition net.qh:349
int ReadByte()
#define STAT(...)
Definition stats.qh:94
void WarpZone_TraceBox_ThroughZone(vector org, vector mi, vector ma, vector end, float nomonsters, entity forent, entity zone, WarpZone_trace_callback_t cb)
Definition common.qc:192
vector WarpZone_TransformOrigin(entity wz, vector v)
Definition common.qc:486
entity WarpZone_trace_transform
Definition common.qh:39
#define MOVE_NOTHING
Definition common.qh:35
float bound(float min, float value, float max)
float vlen(vector v)
vector vectoangles(vector v)
float min(float f,...)
float max(float f,...)
void set_movetype(entity this, int mt)
Definition movetypes.qc:4
const int MOVETYPE_NONE
Definition movetypes.qh:133
const int MOVETYPE_TOSS
Definition movetypes.qh:139
var void func_null()
string string_null
Definition nil.qh:9
strcat(_("^F4Countdown stopped!"), "\n^BG", _("Teams are too unbalanced."))
entity Notification
always last
Definition all.qh:85
#define entityclass(...)
Definition oo.qh:51
#define METHOD(cname, name, prototype)
Definition oo.qh:274
#define classfield(name)
Definition oo.qh:56
#define NULL
Definition post.qh:14
const int PROJECTILE_HOOKBOMB
float health
Legacy fields for the resources. To be removed.
Definition resources.qh:9
#define w_getbestweapon(ent, wepent)
Definition selection.qh:23
#define setthink(e, f)
vector
Definition self.qh:96
entity entity toucher
Definition self.qh:76
#define settouch(e, f)
Definition self.qh:77
void RemoveHook(entity this)
Definition hook.qc:48
void RemoveGrapplingHooks(entity pl)
Definition hook.qc:30
void FireGrapplingHook(entity actor,.entity weaponentity)
Definition hook.qc:311
const float HOOK_PULLING
Definition hook.qh:29
const float HOOK_WAITING_FOR_RELEASE
Definition hook.qh:31
const float HOOK_FIRING
Definition hook.qh:27
bool autocvar_g_balance_grapplehook_crouchslide
Definition hook.qh:16
float hook_time
Definition hook.qh:24
const float HOOK_REMOVING
Definition hook.qh:28
int hook_state
Definition hook.qh:32
float autocvar_g_balance_grapplehook_refire
Definition hook.qh:12
float W_CheckProjectileDamage(entity inflictor, entity projowner, int deathtype, float exception)
Definition common.qc:45
void W_PrepareExplosionByDamage(entity this, entity attacker, void(entity this) explode)
Definition common.qc:87
void adaptor_think2use_hittype_splash(entity this)
Definition common.qc:106
const int MIF_SPLASH
Definition common.qh:46
int projectiledeathtype
Definition common.qh:21
#define PROJECTILE_TOUCH(e, t)
Definition common.qh:28
IntrusiveList g_projectiles
Definition common.qh:58
const int MIF_ARC
Definition common.qh:47
#define PROJECTILE_MAKETRIGGER(e)
Definition common.qh:34
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
const int CH_SHOTS_SINGLE
Definition sound.qh:15
const float ATTEN_NORM
Definition sound.qh:30
#define sound(e, c, s, v, a)
Definition sound.qh:52
#define PAGE_TEXT
Definition string.qh:651
#define PAR(...)
Adds an individually translatable paragraph to PAGE_TEXT without having to deal with strcat and sprin...
Definition string.qh:657
#define PAGE_TEXT_INIT()
Definition string.qh:650
const int DAMAGE_YES
Definition subs.qh:80
float autocvar_g_balance_pause_fuel_regen
float ammo
Definition sv_turrets.qh:43
const int NUM_TEAM_2
Definition teams.qh:14
const int NUM_TEAM_4
Definition teams.qh:16
const int NUM_TEAM_3
Definition teams.qh:15
const int NUM_TEAM_1
Definition teams.qh:13
entity realowner
int autocvar_g_projectiles_newton_style
Definition tracing.qh:11
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
int autocvar_chase_active
Definition view.qh:17
entity viewmodels[MAX_WEAPONSLOTS]
Definition view.qh:108
string W_Guide_Keybinds(Weapon wep)
Definition all.qc:824
string W_Guide_DPS_onlySecondary(string name, string sec)
Definition all.qc:946
#define WEP_CVAR_PRI(wep, name)
Definition all.qh:338
#define WEP_CVAR_SEC(wep, name)
Definition all.qh:339
const int MAX_WEAPONSLOTS
Definition weapon.qh:16
entity weaponentities[MAX_WEAPONSLOTS]
Definition weapon.qh:17
void W_DecreaseAmmo(Weapon wep, entity actor, float ammo_use,.entity weaponentity)
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)
entity weaponentity_fld