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{
9 WEP_CVAR_SEC(WEP_HOOK, duration),
10 WEP_CVAR_SEC(WEP_HOOK, power),
11 WEP_CVAR_SEC(WEP_HOOK, damage),
12 WEP_CVAR_SEC(WEP_HOOK, edgedamage),
13 WEP_CVAR_SEC(WEP_HOOK, radius),
14 WEP_CVAR_SEC(WEP_HOOK, force),
15 this.realowner,
17}
18
20{
21 this.event_damage = func_null;
22 settouch(this, func_null);
23 this.effects |= EF_NODRAW;
24
27 this.teleport_time = time;
28 this.dmg_last = 1;
30}
31
32void W_Hook_Explode2_use(entity this, entity actor, entity trigger)
33{
34 W_Hook_Explode2(this);
35}
36
37void W_Hook_Damage(entity this, entity inflictor, entity attacker, float damage, int deathtype, .entity weaponentity, vector hitloc, vector force)
38{
39 if (GetResource(this, RES_HEALTH) <= 0)
40 return;
41 if (!W_CheckProjectileDamage(inflictor.realowner, this.realowner, deathtype, -1)) // no exceptions
42 return; // g_projectiles_damage says to halt
43
44 SetResourceExplicit(this, RES_HEALTH, GetResource(this, RES_HEALTH));
45
46 if (GetResource(this, RES_HEALTH) <= 0)
48}
49
51{
53 this.use(this, NULL, NULL);
54}
55
56void W_Hook_Attack2(Weapon thiswep, entity actor, .entity weaponentity)
57{
58 //W_DecreaseAmmo(thiswep, actor, WEP_CVAR_SEC(WEP_HOOK, ammo)); // WEAPONTODO: Figure out how to handle ammo with hook secondary (gravitybomb)
59 W_SetupShot(actor, weaponentity, false, 4, SND_HOOKBOMB_FIRE, CH_WEAPON_A, WEP_CVAR_SEC(WEP_HOOK, damage), WEP_HOOK.m_id | HITTYPE_SECONDARY);
60
61 entity gren = new(hookbomb);
62 gren.owner = gren.realowner = actor;
63 gren.bot_dodge = true;
64 gren.bot_dodgerating = WEP_CVAR_SEC(WEP_HOOK, damage);
67 gren.projectiledeathtype = WEP_HOOK.m_id | HITTYPE_SECONDARY;
68 gren.weaponentity_fld = weaponentity;
69 setorigin(gren, w_shotorg);
70 setsize(gren, '0 0 0', '0 0 0');
71
72 gren.nextthink = time + WEP_CVAR_SEC(WEP_HOOK, lifetime);
74 gren.use = W_Hook_Explode2_use;
76
77 gren.takedamage = DAMAGE_YES;
78 SetResourceExplicit(gren, RES_HEALTH, WEP_CVAR_SEC(WEP_HOOK, health));
79 gren.damageforcescale = WEP_CVAR_SEC(WEP_HOOK, damageforcescale);
80 gren.event_damage = W_Hook_Damage;
81 gren.damagedbycontents = true;
83 gren.missile_flags = MIF_SPLASH | MIF_ARC;
84
85 gren.velocity = '0 0 1' * WEP_CVAR_SEC(WEP_HOOK, speed);
87 gren.velocity += actor.velocity;
88
89 gren.gravity = WEP_CVAR_SEC(WEP_HOOK, gravity);
90 //W_SetupProjVelocity_Basic(gren); // just falling down!
91
92 gren.angles = '0 0 0';
93 gren.flags = FL_PROJECTILE;
95 IL_PUSH(g_bot_dodge, gren);
96
97 CSQCProjectile(gren, true, PROJECTILE_HOOKBOMB, true);
98
99 MUTATOR_CALLHOOK(EditProjectile, actor, gren);
100}
101
102METHOD(Hook, wr_think, void(entity thiswep, entity actor, .entity weaponentity, int fire))
103{
104 if (fire & 1)
105 {
106 if (!actor.(weaponentity).hook
107 && !(actor.(weaponentity).hook_state & HOOK_WAITING_FOR_RELEASE)
108 && actor.(weaponentity).hook_refire < time
109 && weapon_prepareattack(thiswep, actor, weaponentity, false, -1))
110 {
111 W_DecreaseAmmo(thiswep, actor, thiswep.ammo_factor * WEP_CVAR_PRI(WEP_HOOK, ammo), weaponentity);
112 actor.(weaponentity).hook_state |= HOOK_FIRING;
113 actor.(weaponentity).hook_state |= HOOK_WAITING_FOR_RELEASE;
114 weapon_thinkf(actor, weaponentity, WFRAME_FIRE1, WEP_CVAR_PRI(WEP_HOOK, animtime), w_ready);
115 }
116 }
117 else
118 {
119 actor.(weaponentity).hook_state |= HOOK_REMOVING;
120 actor.(weaponentity).hook_state &= ~HOOK_WAITING_FOR_RELEASE;
121 }
122
123 if (fire & 2)
124 if (weapon_prepareattack(thiswep, actor, weaponentity, true, WEP_CVAR_SEC(WEP_HOOK, refire)))
125 {
126 W_Hook_Attack2(thiswep, actor, weaponentity);
127 weapon_thinkf(actor, weaponentity, WFRAME_FIRE2, WEP_CVAR_SEC(WEP_HOOK, animtime), w_ready);
128 }
129
130 if (actor.(weaponentity).hook)
131 {
132 // if hooked, no bombs, and increase the timer
133 actor.(weaponentity).hook_refire = max(actor.(weaponentity).hook_refire, time + WEP_CVAR_PRI(WEP_HOOK, refire) * W_WeaponRateFactor(actor));
134
135 // hook also inhibits health regeneration, but only for 1 second
136 if (!(actor.items & IT_UNLIMITED_AMMO))
137 actor.pauseregen_finished = max(actor.pauseregen_finished, time + autocvar_g_balance_pause_fuel_regen);
138 }
139
140 if (actor.(weaponentity).hook && actor.(weaponentity).hook.state == 1)
141 {
142 float hooked_time_max = WEP_CVAR_PRI(WEP_HOOK, hooked_time_max);
143 if (hooked_time_max > 0 && time > actor.(weaponentity).hook_time_hooked + hooked_time_max)
144 actor.(weaponentity).hook_state |= HOOK_REMOVING;
145
146 float hooked_fuel = thiswep.ammo_factor * WEP_CVAR_PRI(WEP_HOOK, hooked_ammo);
147 if (hooked_fuel > 0
148 && time > actor.(weaponentity).hook_time_fueldecrease
149 && !(actor.items & IT_UNLIMITED_AMMO))
150 {
151 if (GetResource(actor, RES_FUEL) >= (time - actor.(weaponentity).hook_time_fueldecrease) * hooked_fuel)
152 {
153 W_DecreaseAmmo(thiswep, actor, (time - actor.(weaponentity).hook_time_fueldecrease) * hooked_fuel, weaponentity);
154 actor.(weaponentity).hook_time_fueldecrease = time;
155 // decrease next frame again
156 }
157 else
158 {
159 SetResource(actor, RES_FUEL, 0);
160 actor.(weaponentity).hook_state |= HOOK_REMOVING;
161 if (actor.(weaponentity).m_weapon != WEP_Null) // offhand
162 W_SwitchWeapon_Force(actor, w_getbestweapon(actor, weaponentity), weaponentity);
163 }
164 }
165 }
166 else
167 {
168 actor.(weaponentity).hook_time_hooked = time;
169 actor.(weaponentity).hook_time_fueldecrease = time + WEP_CVAR_PRI(WEP_HOOK, hooked_time_free);
170 }
171
172 actor.(weaponentity).hook_state = BITSET(actor.(weaponentity).hook_state, HOOK_PULLING, (!PHYS_INPUT_BUTTON_CROUCH(actor) || !autocvar_g_balance_grapplehook_crouchslide));
173
174 if (actor.(weaponentity).hook_state & HOOK_FIRING)
175 {
176 if (actor.(weaponentity).hook)
177 RemoveHook(actor.(weaponentity).hook);
178 FireGrapplingHook(actor, weaponentity);
179 actor.(weaponentity).hook_state &= ~HOOK_FIRING;
180 actor.(weaponentity).hook_refire = max(actor.(weaponentity).hook_refire, time + autocvar_g_balance_grapplehook_refire * W_WeaponRateFactor(actor));
181 }
182 else if (actor.(weaponentity).hook_state & HOOK_REMOVING)
183 {
184 if (actor.(weaponentity).hook)
185 RemoveHook(actor.(weaponentity).hook);
186 actor.(weaponentity).hook_state &= ~HOOK_REMOVING;
187 }
188}
189
190METHOD(Hook, wr_setup, void(entity thiswep, entity actor, .entity weaponentity))
191{
192 actor.(weaponentity).hook_state &= ~HOOK_WAITING_FOR_RELEASE;
193}
194
195METHOD(Hook, wr_checkammo1, bool(Hook thiswep, entity actor, .entity weaponentity))
196{
197 if (!thiswep.ammo_factor)
198 return true;
199 if (actor.(weaponentity).hook)
200 return GetResource(actor, RES_FUEL) > 0;
201
202 return GetResource(actor, RES_FUEL) >= WEP_CVAR_PRI(WEP_HOOK, ammo);
203}
204
205METHOD(Hook, wr_checkammo2, bool(Hook thiswep, entity actor, .entity weaponentity))
206{
207 // infinite ammo for now
208 return true; // actor.ammo_cells >= WEP_CVAR_SEC(WEP_HOOK, ammo); // WEAPONTODO: see above
209}
210
211METHOD(Hook, wr_resetplayer, void(entity thiswep, entity actor))
212{
214 for (int slot = 0; slot < MAX_WEAPONSLOTS; ++slot)
215 {
216 .entity weaponentity = weaponentities[slot];
217 actor.(weaponentity).hook_time = 0;
218 actor.(weaponentity).hook_refire = time;
219 }
220}
221
222METHOD(Hook, wr_killmessage, Notification(entity thiswep))
223{
224 return WEAPON_HOOK_MURDER;
225}
226
227#endif // SVQC
228#ifdef CSQC
229
230METHOD(Hook, wr_impacteffect, void(entity thiswep, entity actor))
231{
232 // the hook bomb uses a negative w_backoff factor because it explodes slightly below the floor, unlike other projectiles
233 vector org2 = w_org + w_backoff * -2;
234 pointparticles(EFFECT_HOOK_EXPLODE, org2, '0 0 0', 1);
235 if (!w_issilent)
236 sound(actor, CH_SHOTS, SND_HOOKBOMB_IMPACT, VOL_BASE, ATTN_NORM);
237}
238
240#include <lib/warpzone/common.qh>
241
243
244void Draw_CylindricLine(vector from, vector to, float thickness, string texture, float aspect, float shift, vector rgb, float theAlpha, float drawflag, vector vieworg);
245
248classfield(Hook) .vector velocity;
249classfield(Hook) .float HookSilent;
250classfield(Hook) .float HookRange;
251
263
265{
266 vector a, b;
267 string tex;
268
269 if (this.teleport_time && time > this.teleport_time)
270 {
271 sound(this, CH_SHOTS_SINGLE, SND_Null, VOL_BASE, ATTEN_NORM); // safeguard
272 this.teleport_time = 0;
273 }
274
276
277 int s = W_GunAlign(viewmodels[this.cnt], STAT(GUNALIGN)) - 1;
278 vector vs = hook_shotorigin[s];
279
280 if (this.owner.sv_entnum == player_localentnum - 1)
281 {
283 a = csqcplayer.origin + csqcplayer.view_ofs;
284 else
285 a = view_origin + view_forward * vs.x + view_right * -vs.y + view_up * vs.z;
286 b = this.origin;
287 }
288 else
289 {
290 a = this.velocity;
291 b = this.origin;
292 }
293
294 int t = entcs_GetTeamColor(this.owner.sv_entnum);
295
296 float intensity = autocvar_cl_grapplehook_alpha;
297 float offset = 0;
298 vector rgb = colormapPaletteColor(entcs_GetClientColors(this.sv_entnum - 1) & 0x0F, true);
299 switch (t)
300 {
301 case NUM_TEAM_1: tex = "particles/hook_red"; break;
302 case NUM_TEAM_2: tex = "particles/hook_blue"; break;
303 case NUM_TEAM_3: tex = "particles/hook_yellow"; break;
304 case NUM_TEAM_4: tex = "particles/hook_pink"; break;
305 default: tex = "particles/hook_white"; break;
306 }
307
308 MUTATOR_CALLHOOK(DrawGrapplingHook, this, tex, rgb, t);
309 tex = M_ARGV(1, string);
310 rgb = M_ARGV(2, vector);
311
318
320
321 if (vdist(trace_endpos - atrans, >, 0.5))
322 {
323 setorigin(this, trace_endpos); // hook endpoint!
324 this.angles = vectoangles(trace_endpos - atrans);
325 this.drawmask = MASK_NORMAL;
326 }
327 else
328 this.drawmask = 0;
329}
330
332{
333 sound(this, CH_SHOTS_SINGLE, SND_Null, VOL_BASE, ATTEN_NORM);
334
335 for (int slot = 0; slot < MAX_WEAPONSLOTS; ++slot)
336 {
337 entity wep = viewmodels[slot];
338 if (wep.hook == this)
339 wep.hook = NULL;
340 }
341}
342
343NET_HANDLE(ENT_CLIENT_HOOK, bool isNew)
344{
345 int sf = ReadByte();
346
347 this.HookSilent = sf & 0x80;
349
351
352 if (sf & 1)
353 {
354 this.sv_entnum = ReadByte();
355 int slot = ReadByte();
356 this.owner = playerslots[this.sv_entnum - 1];
357 if (this.sv_entnum == player_localentnum)
358 viewmodels[slot].hook = this;
359 this.cnt = slot;
360 this.HookRange = 0;
361 }
362 if (sf & 2)
363 {
364 this.origin = ReadVector();
365 setorigin(this, this.origin);
366 }
367 if (sf & 4)
368 this.velocity = ReadVector();
369
371
372 if (isNew || !this.teleport_time)
373 {
374 this.draw = Draw_GrapplingHook;
375 if (!IL_CONTAINS(g_drawables, this))
376 IL_PUSH(g_drawables, this);
377 this.entremove = Remove_GrapplingHook;
378
379 setmodel(this, MDL_HOOK);
380 this.drawmask = MASK_NORMAL;
381 }
382
383 this.teleport_time = time + 10;
384 return true;
385}
386
387// TODO: hook: temporarily transform this.origin for drawing the model along warpzones!
388#endif // CSQC
389#ifdef MENUQC
392
393METHOD(Hook, describe, string(Hook this))
394{
395 TC(Hook, this);
397 PAR(_("The %s is a unique weapon, firing a chain forwards which pulls you in once it latches onto something."), COLORED_NAME(this));
398 PAR(_("The secondary fire usually drops a gravity bomb that affects enemies, also releasing light and smoke sort of like a flashbang."));
399 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));
400 PAR(_("The %s allows reaching previously unreachable places on maps and zooming around the map at high speeds, "
401 "making both surprise ambushes and miraculous escapes possible."), COLORED_NAME(this));
402 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"));
403 PAR(W_Guide_Keybinds(this));
404 PAR(W_Guide_DPS_onlySecondary(this.netname, "secondary"));
405 return PAGE_TEXT;
406}
407
408#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:264
void W_Hook_Explode2(entity this)
Definition hook.qc:19
void W_Hook_Damage(entity this, entity inflictor, entity attacker, float damage, int deathtype,.entity weaponentity, vector hitloc, vector force)
Definition hook.qc:37
string Draw_GrapplingHook_trace_callback_tex
Definition hook.qc:252
void W_Hook_Explode2_use(entity this, entity actor, entity trigger)
Definition hook.qc:32
float Draw_GrapplingHook_trace_callback_a
Definition hook.qc:255
void Draw_GrapplingHook_trace_callback(vector start, vector hit, vector end)
Definition hook.qc:256
void Remove_GrapplingHook(entity this)
Definition hook.qc:331
vector Draw_GrapplingHook_trace_callback_rgb
Definition hook.qc:254
float autocvar_cl_grapplehook_alpha
Definition hook.qc:242
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:253
void W_Hook_Attack2(Weapon thiswep, entity actor,.entity weaponentity)
Definition hook.qc:56
void W_Hook_Touch2(entity this, entity toucher)
Definition hook.qc:50
float hook_refire
Definition hook.qh:89
float hook_time_fueldecrease
Definition hook.qh:91
float hook_time_hooked
Definition hook.qh:90
const int FL_PROJECTILE
Definition constants.qh:77
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)
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_SECONDARY
Definition all.qh:31
float speed
Definition dynlight.qc:9
#define pointparticles(effect, org, vel, howmany)
Definition effect.qh:6
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
vector WarpZone_TransformOrigin(entity wz, vector org)
Transforms origin org across warpzone wz.
Definition common.qc:489
#define WarpZone_TraceLine_ThroughZone(org, end, nomonsters, forent, zone, cb)
Definition common.qh:47
entity WarpZone_trace_transform
Transform accumulator during a trace.
Definition common.qh:40
#define MOVE_NOTHING
Definition common.qh:35
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 W_DamageOverTime_Think(entity this, float duration, float duration_power, float damage, float edgedamage, float rad, float force, entity cantbe, float think_delay)
Applies damage over time, called within a think function.
Definition common.qc:285
void adaptor_think2use_hittype_splash(entity this)
Definition common.qc:106
const int MIF_SPLASH
Definition common.qh:58
float dmg_last
Definition common.qh:27
#define PROJECTILE_TOUCH(e, t)
Definition common.qh:40
IntrusiveList g_projectiles
Definition common.qh:70
const int MIF_ARC
Definition common.qh:59
#define PROJECTILE_MAKETRIGGER(e)
Definition common.qh:46
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)