Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
tracing.qh File Reference
Include dependency graph for tracing.qh:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define W_SetupProjVelocity_Basic(ent, pspeed, pspread)
#define W_SetupProjVelocity_BOTH(ent, wep, isprimary)
#define W_SetupProjVelocity_PRE(ent, wep, prefix)
#define W_SetupProjVelocity_PRI(ent, wep)
#define W_SetupProjVelocity_SEC(ent, wep)
#define W_SetupProjVelocity_UP_BOTH(ent, wep, isprimary)
#define W_SetupProjVelocity_UP_PRE(ent, wep, prefix)
#define W_SetupProjVelocity_UP_PRI(ent, wep)
#define W_SetupProjVelocity_UP_SEC(ent, wep)
#define W_SetupShot(ent, wepent, antilag, recoil, snd, chan, maxdamage, deathtype)
#define W_SetupShot_Dir(ent, wepent, s_forward, antilag, recoil, snd, chan, maxdamage, deathtype)
#define W_SetupShot_Dir_ProjectileSize(ent, wepent, s_forward, mi, ma, antilag, recoil, snd, chan, maxdamage, deathtype)
#define W_SetupShot_ProjectileSize(ent, wepent, mi, ma, antilag, recoil, snd, chan, maxdamage, deathtype)
#define W_SetupShot_Range(ent, wepent, antilag, recoil, snd, chan, maxdamage, range, deathtype)

Functions

void crosshair_trace (entity pl)
void crosshair_trace_plusvisibletriggers (entity pl)
void crosshair_trace_plusvisibletriggers__is_wz (entity pl, bool is_wz)
void fireBullet (entity this,.entity weaponentity, vector start, vector dir, float spread, float max_solid_penetration, float damage, float headshot_multiplier, float force, float dtype, entity tracer_effect)
void fireBullet_antilag (entity this,.entity weaponentity, vector start, vector dir, float spread, float max_solid_penetration, float damage, float headshot_multiplier, float force, float dtype, entity tracer_effect, bool do_antilag)
void fireBullet_trace_callback (vector start, vector hit, vector end)
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)
 STATIC_INIT (g_ctrace_changed)
 STATIC_INIT (g_railgunhit)
void traceline_antilag (entity source, vector v1, vector v2, float nomonst, entity forent, float lag)
vector W_CalculateProjectileVelocity (entity actor, vector pvelocity, vector mvelocity, float forceAbsolute)
void W_SetupProjVelocity_Explicit (entity proj, vector dir, vector upDir, float pSpeed, float pUpSpeed, float pZSpeed, float spread, float forceAbsolute)
void W_SetupShot_Dir_ProjectileSize_Range (entity ent,.entity weaponentity, vector s_forward, vector mi, vector ma, float antilag, float recoil, Sound snd, float chan, float maxdamage, float range, int deathtype)
 This function calculates w_shotorg and w_shotdir based on the weapon model offset, trueaim and antilag, and won't put w_shotorg inside a wall.
vector W_SetupShot_GetAlternatingOffset (int bullet_count)
void WarpZone_crosshair_trace (entity pl)
void WarpZone_crosshair_trace_plusvisibletriggers (entity pl)

Variables

float autocvar_g_ballistics_density_corpse
float autocvar_g_ballistics_density_player
float autocvar_g_ballistics_mindistance
bool autocvar_g_ballistics_penetrate_clips = true
float autocvar_g_ballistics_solidpenetration_exponent = 1
int autocvar_g_hitscan_spread_style
bool autocvar_g_norecoil
int autocvar_g_projectiles_newton_style
float autocvar_g_projectiles_newton_style_2_maxfactor
float autocvar_g_projectiles_newton_style_2_minfactor
int autocvar_g_projectiles_spread_style
float autocvar_g_trueaim_minrange
float ballistics_density
entity fireBullet_last_hit
entity fireBullet_trace_callback_eff
IntrusiveList g_ctrace_changed
IntrusiveList g_railgunhit
float railgundistance
vector railgunforce
bool railgunhit
vector railgunhitloc
float railgunhitsolidbackup
vector w_shotdir
vector w_shotend
vector w_shotorg

Macro Definition Documentation

◆ W_SetupProjVelocity_Basic

#define W_SetupProjVelocity_Basic ( ent,
pspeed,
pspread )
Value:
W_SetupProjVelocity_Explicit(ent, w_shotdir, v_up, pspeed, 0, 0, pspread, false)
vector v_up
void W_SetupProjVelocity_Explicit(entity proj, vector dir, vector upDir, float pSpeed, float pUpSpeed, float pZSpeed, float spread, float forceAbsolute)
Definition tracing.qc:188
vector w_shotdir
Definition tracing.qh:20

Definition at line 51 of file tracing.qh.

51#define W_SetupProjVelocity_Basic(ent,pspeed,pspread) \
52 W_SetupProjVelocity_Explicit(ent, w_shotdir, v_up, pspeed, 0, 0, pspread, false)

Referenced by W_Devastator_Attack(), W_HLAC_Attack(), W_HLAC_Attack2(), W_MineLayer_Attack(), W_Nexball_Attack2(), W_OverkillRocketPropelledChainsaw_Attack(), and W_Porto_Attack().

◆ W_SetupProjVelocity_BOTH

#define W_SetupProjVelocity_BOTH ( ent,
wep,
isprimary )
Value:
if (isprimary) \
W_SetupProjVelocity_PRI(ent, wep); \
else \
W_SetupProjVelocity_SEC(ent, wep);

Definition at line 74 of file tracing.qh.

74#define W_SetupProjVelocity_BOTH(ent, wep, isprimary) \
75 if (isprimary) \
76 W_SetupProjVelocity_PRI(ent, wep); \
77 else \
78 W_SetupProjVelocity_SEC(ent, wep);

◆ W_SetupProjVelocity_PRE

#define W_SetupProjVelocity_PRE ( ent,
wep,
prefix )
Value:
W_SetupProjVelocity_Explicit(ent, w_shotdir, v_up, WEP_CVAR(wep, prefix##speed), 0, 0, WEP_CVAR(wep, prefix##spread), false)
float speed
Definition dynlight.qc:9
#define WEP_CVAR(wep, name)
Definition all.qh:337

Definition at line 67 of file tracing.qh.

67#define W_SetupProjVelocity_PRE(ent, wep, prefix) \
68 W_SetupProjVelocity_Explicit(ent, w_shotdir, v_up, WEP_CVAR(wep, prefix##speed), 0, 0, WEP_CVAR(wep, prefix##spread), false)

Referenced by W_Arc_Attack_Bolt(), and W_Seeker_Fire_Tag().

◆ W_SetupProjVelocity_PRI

#define W_SetupProjVelocity_PRI ( ent,
wep )
Value:
#define WEP_CVAR_PRI(wep, name)
Definition all.qh:338

Definition at line 69 of file tracing.qh.

69#define W_SetupProjVelocity_PRI(ent, wep) \
70 W_SetupProjVelocity_Explicit(ent, w_shotdir, v_up, WEP_CVAR_PRI(wep, speed), 0, 0, WEP_CVAR_PRI(wep, spread), false)

Referenced by W_Electro_Attack_Bolt(), W_Fireball_Attack1(), and W_Hagar_Attack().

◆ W_SetupProjVelocity_SEC

#define W_SetupProjVelocity_SEC ( ent,
wep )
Value:
#define WEP_CVAR_SEC(wep, name)
Definition all.qh:339

Definition at line 71 of file tracing.qh.

71#define W_SetupProjVelocity_SEC(ent, wep) \
72 W_SetupProjVelocity_Explicit(ent, w_shotdir, v_up, WEP_CVAR_SEC(wep, speed), 0, 0, WEP_CVAR_SEC(wep, spread), false)

Referenced by W_Hagar_Attack2().

◆ W_SetupProjVelocity_UP_BOTH

#define W_SetupProjVelocity_UP_BOTH ( ent,
wep,
isprimary )
Value:
if (isprimary) \
W_SetupProjVelocity_UP_PRI(ent, wep); \
else \
W_SetupProjVelocity_UP_SEC(ent, wep);

Definition at line 61 of file tracing.qh.

61#define W_SetupProjVelocity_UP_BOTH(ent, wep, isprimary) \
62 if (isprimary) \
63 W_SetupProjVelocity_UP_PRI(ent, wep); \
64 else \
65 W_SetupProjVelocity_UP_SEC(ent, wep);

◆ W_SetupProjVelocity_UP_PRE

#define W_SetupProjVelocity_UP_PRE ( ent,
wep,
prefix )
Value:
W_SetupProjVelocity_Explicit(ent, w_shotdir, v_up, WEP_CVAR(wep, prefix##speed), WEP_CVAR(wep, prefix##speed_up), WEP_CVAR(wep, prefix##speed_z), WEP_CVAR(wep, prefix##spread), false)

Definition at line 54 of file tracing.qh.

54#define W_SetupProjVelocity_UP_PRE(ent, wep, prefix) \
55 W_SetupProjVelocity_Explicit(ent, w_shotdir, v_up, WEP_CVAR(wep, prefix##speed), WEP_CVAR(wep, prefix##speed_up), WEP_CVAR(wep, prefix##speed_z), WEP_CVAR(wep, prefix##spread), false)

Referenced by W_Seeker_Fire_Flac(), and W_Seeker_Fire_Missile().

◆ W_SetupProjVelocity_UP_PRI

#define W_SetupProjVelocity_UP_PRI ( ent,
wep )
Value:
W_SetupProjVelocity_Explicit(ent, w_shotdir, v_up, WEP_CVAR_PRI(wep, speed), WEP_CVAR_PRI(wep, speed_up), WEP_CVAR_PRI(wep, speed_z), WEP_CVAR_PRI(wep, spread), false)

Definition at line 56 of file tracing.qh.

56#define W_SetupProjVelocity_UP_PRI(ent, wep) \
57 W_SetupProjVelocity_Explicit(ent, w_shotdir, v_up, WEP_CVAR_PRI(wep, speed), WEP_CVAR_PRI(wep, speed_up), WEP_CVAR_PRI(wep, speed_z), WEP_CVAR_PRI(wep, spread), false)

Referenced by W_Mortar_Attack().

◆ W_SetupProjVelocity_UP_SEC

#define W_SetupProjVelocity_UP_SEC ( ent,
wep )
Value:
W_SetupProjVelocity_Explicit(ent, w_shotdir, v_up, WEP_CVAR_SEC(wep, speed), WEP_CVAR_SEC(wep, speed_up), WEP_CVAR_SEC(wep, speed_z), WEP_CVAR_SEC(wep, spread), false)

Definition at line 58 of file tracing.qh.

58#define W_SetupProjVelocity_UP_SEC(ent, wep) \
59 W_SetupProjVelocity_Explicit(ent, w_shotdir, v_up, WEP_CVAR_SEC(wep, speed), WEP_CVAR_SEC(wep, speed_up), WEP_CVAR_SEC(wep, speed_z), WEP_CVAR_SEC(wep, spread), false)

Referenced by W_Electro_Attack_Orb(), W_Fireball_Attack2(), and W_Mortar_Attack2().

◆ W_SetupShot

#define W_SetupShot ( ent,
wepent,
antilag,
recoil,
snd,
chan,
maxdamage,
deathtype )
Value:
W_SetupShot_ProjectileSize(ent, wepent, '0 0 0', '0 0 0', antilag, recoil, snd, chan, maxdamage, deathtype)
#define W_SetupShot_ProjectileSize(ent, wepent, mi, ma, antilag, recoil, snd, chan, maxdamage, deathtype)
Definition tracing.qh:30

Definition at line 34 of file tracing.qh.

34#define W_SetupShot(ent, wepent, antilag, recoil, snd, chan, maxdamage, deathtype) \
35 W_SetupShot_ProjectileSize(ent, wepent, '0 0 0', '0 0 0', antilag, recoil, snd, chan, maxdamage, deathtype)

Referenced by CheatCommand(), W_Arc_Attack_Bolt(), W_Crylink_Attack(), W_Crylink_Attack2(), W_Hagar_Attack(), W_Hagar_Attack2(), W_Hagar_Attack2_Load_Release(), W_HLAC_Attack(), W_HLAC_Attack2(), W_Hook_Attack2(), W_MachineGun_Attack(), W_MachineGun_Attack_Auto(), W_MachineGun_Attack_Burst(), W_Nexball_Attack2(), W_OverkillHeavyMachineGun_Attack_Auto(), W_OverkillMachineGun_Attack_Auto(), W_OverkillNex_Attack(), W_Porto_Attack(), W_Rifle_FireBullet(), W_Shotgun_Attack(), W_Tuba_NoteOn(), W_Vaporizer_Attack(), and W_Vortex_Attack().

◆ W_SetupShot_Dir

#define W_SetupShot_Dir ( ent,
wepent,
s_forward,
antilag,
recoil,
snd,
chan,
maxdamage,
deathtype )
Value:
W_SetupShot_Dir_ProjectileSize(ent, wepent, s_forward, '0 0 0', '0 0 0', antilag, recoil, snd, chan, maxdamage, deathtype)
#define W_SetupShot_Dir_ProjectileSize(ent, wepent, s_forward, mi, ma, antilag, recoil, snd, chan, maxdamage, deathtype)
Definition tracing.qh:28

Definition at line 32 of file tracing.qh.

32#define W_SetupShot_Dir(ent, wepent, s_forward, antilag, recoil, snd, chan, maxdamage, deathtype) \
33 W_SetupShot_Dir_ProjectileSize(ent, wepent, s_forward, '0 0 0', '0 0 0', antilag, recoil, snd, chan, maxdamage, deathtype)

Referenced by W_Blaster_Attack().

◆ W_SetupShot_Dir_ProjectileSize

#define W_SetupShot_Dir_ProjectileSize ( ent,
wepent,
s_forward,
mi,
ma,
antilag,
recoil,
snd,
chan,
maxdamage,
deathtype )
Value:
W_SetupShot_Dir_ProjectileSize_Range(ent, wepent, s_forward, mi, ma, antilag, recoil, snd, chan, maxdamage, max_shot_distance, deathtype)
void W_SetupShot_Dir_ProjectileSize_Range(entity ent,.entity weaponentity, vector s_forward, vector mi, vector ma, float antilag, float recoil, Sound snd, float chan, float maxdamage, float range, int deathtype)
This function calculates w_shotorg and w_shotdir based on the weapon model offset,...
Definition tracing.qc:24
int max_shot_distance
Definition weapon.qh:245

Definition at line 28 of file tracing.qh.

28#define W_SetupShot_Dir_ProjectileSize(ent, wepent, s_forward, mi, ma, antilag, recoil, snd, chan, maxdamage, deathtype) \
29 W_SetupShot_Dir_ProjectileSize_Range(ent, wepent, s_forward, mi, ma, antilag, recoil, snd, chan, maxdamage, max_shot_distance, deathtype)

◆ W_SetupShot_ProjectileSize

#define W_SetupShot_ProjectileSize ( ent,
wepent,
mi,
ma,
antilag,
recoil,
snd,
chan,
maxdamage,
deathtype )
Value:
W_SetupShot_Dir_ProjectileSize(ent, wepent, v_forward, mi, ma, antilag, recoil, snd, chan, maxdamage, deathtype)
vector v_forward

Definition at line 30 of file tracing.qh.

30#define W_SetupShot_ProjectileSize(ent, wepent, mi, ma, antilag, recoil, snd, chan, maxdamage, deathtype) \
31 W_SetupShot_Dir_ProjectileSize(ent, wepent, v_forward, mi, ma, antilag, recoil, snd, chan, maxdamage, deathtype)

Referenced by FireGrapplingHook(), toss_nade(), W_Devastator_Attack(), W_Electro_Attack_Bolt(), W_Electro_Attack_Orb(), W_Fireball_Attack1(), W_Fireball_Attack2(), W_Fireball_AttackEffect(), W_MineLayer_Attack(), W_Mortar_Attack(), W_Mortar_Attack2(), W_Nexball_Attack(), W_Nexball_Attack2(), W_OverkillRocketPropelledChainsaw_Attack(), W_RocketMinsta_Attack(), W_Seeker_Fire_Flac(), W_Seeker_Fire_Missile(), and W_Seeker_Fire_Tag().

◆ W_SetupShot_Range

#define W_SetupShot_Range ( ent,
wepent,
antilag,
recoil,
snd,
chan,
maxdamage,
range,
deathtype )
Value:
W_SetupShot_Dir_ProjectileSize_Range(ent, wepent, v_forward, '0 0 0', '0 0 0', antilag, recoil, snd, chan, maxdamage, range, deathtype)

Definition at line 36 of file tracing.qh.

36#define W_SetupShot_Range(ent, wepent, antilag, recoil, snd, chan, maxdamage, range, deathtype) \
37 W_SetupShot_Dir_ProjectileSize_Range(ent, wepent, v_forward, '0 0 0', '0 0 0', antilag, recoil, snd, chan, maxdamage, range, deathtype)

Referenced by W_Arc_Beam_Think(), and W_Shotgun_Attack2().

Function Documentation

◆ crosshair_trace()

void crosshair_trace ( entity pl)

Definition at line 565 of file tracing.qc.

566{
567 vector trace_start = CS(pl).cursor_trace_start;
568 traceline_antilag(pl, trace_start, trace_start + normalize(CS(pl).cursor_trace_endpos - trace_start) * max_shot_distance, MOVE_NORMAL, pl, ANTILAG_LATENCY(pl));
569}
void traceline_antilag(entity source, vector v1, vector v2, float nomonsters, entity forent, float lag)
Definition antilag.qc:203
#define ANTILAG_LATENCY(e)
Definition antilag.qh:21
const float MOVE_NORMAL
vector cursor_trace_endpos
vector normalize(vector v)
vector
Definition self.qh:96
ClientState CS(Client this)
Definition state.qh:47

References ANTILAG_LATENCY, CS(), cursor_trace_endpos, entity(), max_shot_distance, MOVE_NORMAL, normalize(), traceline_antilag(), and vector.

Referenced by bumblebee_gunner_frame(), bumblebee_pilot_frame(), CheatCommand(), crosshair_trace_plusvisibletriggers__is_wz(), racer_frame(), raptor_frame(), spiderbot_frame(), spiderbot_guide_release(), spiderbot_rocket_do(), and spiderbot_rocket_guided().

◆ crosshair_trace_plusvisibletriggers()

void crosshair_trace_plusvisibletriggers ( entity pl)

Definition at line 571 of file tracing.qc.

572{
574}
void crosshair_trace_plusvisibletriggers__is_wz(entity pl, bool is_wz)
Definition tracing.qc:581

References crosshair_trace_plusvisibletriggers__is_wz(), and entity().

Referenced by Drag().

◆ crosshair_trace_plusvisibletriggers__is_wz()

void crosshair_trace_plusvisibletriggers__is_wz ( entity pl,
bool is_wz )

Definition at line 581 of file tracing.qc.

582{
584 {
585 if (it.model != "")
586 {
587 it.solid = SOLID_BSP;
589 }
590 });
591
592 if (is_wz)
594 else
595 crosshair_trace(pl);
596
597 IL_EACH(g_ctrace_changed, true, it.solid = SOLID_TRIGGER);
598
600}
const float SOLID_TRIGGER
float solid
const float SOLID_BSP
ERASEABLE entity IL_PUSH(IntrusiveList this, entity it)
Push to tail.
#define IL_EACH(this, cond, body)
#define IL_CLEAR(this)
Remove all elements.
#define FOREACH_ENTITY_FLOAT(fld, match, body)
Definition iter.qh:174
void crosshair_trace(entity pl)
Definition tracing.qc:565
void WarpZone_crosshair_trace(entity pl)
Definition tracing.qc:602
IntrusiveList g_ctrace_changed
Definition tracing.qh:117

References crosshair_trace(), entity(), FOREACH_ENTITY_FLOAT, g_ctrace_changed, IL_CLEAR, IL_EACH, IL_PUSH(), solid, SOLID_BSP, SOLID_TRIGGER, and WarpZone_crosshair_trace().

Referenced by crosshair_trace_plusvisibletriggers(), and WarpZone_crosshair_trace_plusvisibletriggers().

◆ fireBullet()

void fireBullet ( entity this,
.entity weaponentity,
vector start,
vector dir,
float spread,
float max_solid_penetration,
float damage,
float headshot_multiplier,
float force,
float dtype,
entity tracer_effect )

Definition at line 560 of file tracing.qc.

561{
562 fireBullet_antilag(this, weaponentity, start, dir, spread, max_solid_penetration, damage, headshot_multiplier, force, dtype, tracer_effect, true);
563}
int dir
Definition impulse.qc:89
void fireBullet_antilag(entity this,.entity weaponentity, vector start, vector dir, float spread, float max_solid_penetration, float damage, float headshot_multiplier, float force, float dtype, entity tracer_effect, bool do_antilag)
Definition tracing.qc:555

References dir, entity(), fireBullet_antilag(), and vector.

Referenced by spiderbot_frame(), and W_OverkillHeavyMachineGun_Attack_Auto().

◆ fireBullet_antilag()

void fireBullet_antilag ( entity this,
.entity weaponentity,
vector start,
vector dir,
float spread,
float max_solid_penetration,
float damage,
float headshot_multiplier,
float force,
float dtype,
entity tracer_effect,
bool do_antilag )

Definition at line 555 of file tracing.qc.

556{
557 fireBullet_falloff(this, weaponentity, start, dir, spread, max_solid_penetration, damage, 0, 0, 0, headshot_multiplier, force, 0, dtype, tracer_effect, do_antilag);
558}
void fireBullet_falloff(entity this,.entity weaponentity, vector start, vector dir, float spread, float max_solid_penetration, float damage, float falloff_halflife, float falloff_mindist, float falloff_maxdist, float headshot_multiplier, float force, float falloff_forcehalflife, float dtype, entity tracer_effect, bool do_antilag)
Definition tracing.qc:379

References dir, entity(), fireBullet_falloff(), and vector.

Referenced by fireBullet().

◆ fireBullet_trace_callback()

void fireBullet_trace_callback ( vector start,
vector hit,
vector end )

Definition at line 371 of file tracing.qc.

372{
373 if (vdist(hit - start, >, 16))
377}
#define trailparticles(e, effect, org, vel)
Definition effect.qh:8
entity WarpZone_trace_forent
Temp, callback is allowed to change it.
Definition common.qh:36
#define NULL
Definition post.qh:14
entity fireBullet_trace_callback_eff
Definition tracing.qh:101
entity fireBullet_last_hit
Definition tracing.qh:102
#define vdist(v, cmp, f)
Vector distance comparison, avoids sqrt().
Definition vector.qh:8

References fireBullet_last_hit, fireBullet_trace_callback_eff, NULL, trailparticles, vdist, vector, and WarpZone_trace_forent.

Referenced by fireBullet_falloff().

◆ FireRailgunBullet()

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 at line 261 of file tracing.qc.

262{
263 vector dir = normalize(end - start);
264 vector force = dir * bforce;
265 end += dir; // go a little bit into the wall because we need to hit this wall later
266
267 bool headshot = false; // indicates that one of the targets hit was a headshot
268
269 // Trace multiple times until we hit a wall, each obstacle will be made
270 // non-solid so we can hit the next, while doing this we spawn effects and
271 // note down which entities were hit so we can damage them later
272 entity o = this;
274 do
275 {
276 tracebox_antilag_force_wz(this, start, '0 0 0', '0 0 0', end, false, o,
277 (CS(this).antilag_debug ? CS(this).antilag_debug : ANTILAG_LATENCY(this)),
280 {
281 o = NULL;
282 continue;
283 }
284
285 // If it is NULL we can't hurt it so stop now
286 if (trace_ent == NULL || trace_fraction == 1)
287 break;
288
289 if (headshot_notify && !headshot && Headshot(trace_ent, this, start, end))
290 headshot = true;
291
292 // Make the entity non-solid so we can hit the next one
294 trace_ent.railgunhit = true;
295 trace_ent.railgunhitloc = trace_endpos;
296 trace_ent.railgunhitsolidbackup = trace_ent.solid;
299 if (trace_ent.solid == SOLID_BSP)
300 Damage_DamageInfo(trace_endpos, bdamage, 0, 0, trace_ent.railgunforce, deathtype, trace_ent.species, this);
301
302 if (trace_ent.solid == SOLID_BSP) // stop if this is a wall
303 break;
304 trace_ent.solid = SOLID_NOT; // make the entity non-solid
305 }
306 while (true);
307
308 vector endpoint = trace_endpos;
309 entity endent = trace_ent;
310 float endq3surfaceflags = trace_dphitq3surfaceflags;
311
312 // Find all the entities the railgun hit and restore their solid state
313 IL_EACH(g_railgunhit, it.railgunhit, it.solid = it.railgunhitsolidbackup);
314
315 // Play the sound for all players (even those hit)
316 entity pseudoprojectile = NULL;
317 FOREACH_CLIENT(IS_REAL_CLIENT(it) && it != this && !(IS_SPEC(it) && it.enemy == this),
318 {
319 if (!pseudoprojectile)
320 pseudoprojectile = new(pseudoprojectile); // we need this so the sound uses the "entchannel4" volume
321
322 msg_entity = it;
323 // We want this to be very loud when close but fall off quickly -> using max base volume and high attenuation
324 soundtoat(MSG_ONE, pseudoprojectile, it.WarpZone_findradius_nearest, CH_SHOTS, SND(NEXWHOOSH_RANDOM()), VOL_BASEVOICE, ATTEN_IDLE, 0);
325 it.WarpZone_findradius_hit = 0; // reset the field we reused; no need to reset .WarpZone_findradius_nearest
326 });
327 if (pseudoprojectile)
328 delete(pseudoprojectile);
329
330 // Find all the entities the railgun hit and hurt them
331 float total_dmg = 0;
332 float foff, ffs;
333 IL_EACH(g_railgunhit, it.railgunhit,
334 {
335 foff = ExponentialFalloff(mindist, maxdist, halflifedist, it.railgundistance);
336 ffs = ExponentialFalloff(mindist, maxdist, forcehalflifedist, it.railgundistance);
337
338 if (accuracy_isgooddamage(this, it))
339 total_dmg += bdamage * foff;
340
341 if (it.takedamage)
342 {
343 // Apply the damage
344 Damage(it, this, this, bdamage * foff, deathtype, weaponentity, it.railgunhitloc, it.railgunforce * ffs);
345 if (it.solid == SOLID_SLIDEBOX)
346 Damage_DamageInfo(it.railgunhitloc, bdamage * foff, 0, 0,
347 bforce * ffs * normalize(it.railgunforce), deathtype, it.species, this);
348 }
349
350 // Reset fields before the list is cleared
351 it.railgunhit = false;
352 it.railgunhitloc = '0 0 0';
353 it.railgunhitsolidbackup = SOLID_NOT;
354 it.railgundistance = 0;
355 });
356
358
359 if (headshot)
360 Send_Notification(NOTIF_ONE, this, MSG_ANNCE, ANNCE_HEADSHOT);
361
362 // Calculate hits and fired shots for hitscan
363 if (this.(weaponentity))
364 accuracy_add(this, this.(weaponentity).m_weapon, 0, min(bdamage, total_dmg), 0); // add to hit
365
366 trace_endpos = endpoint;
367 trace_ent = endent;
368 trace_dphitq3surfaceflags = endq3surfaceflags;
369}
void accuracy_add(entity this, Weapon w, float fired, float hit, float real)
update accuracy stats
Definition accuracy.qc:102
float antilag_debug
Definition antilag.qc:18
void tracebox_antilag_force_wz(entity source, vector v1, vector mi, vector ma, vector v2, float nomonsters, entity forent, float lag, bool wz, WarpZone_trace_callback_t cb)
A version of traceline that must be used by SOLID_SLIDEBOX things that want to hit SOLID_CORPSE thing...
Definition antilag.qc:168
var entity(vector mins, vector maxs,.entity tofield) findbox_tofield_OrFallback
entity trace_ent
const float SOLID_NOT
vector trace_endpos
float trace_dphitq3surfaceflags
float trace_fraction
void Damage_DamageInfo(vector org, float coredamage, float edgedamage, float rad, vector force, int deathtype, float bloodtype, entity dmgowner)
vector WarpZone_UnTransformOrigin(entity wz, vector org)
Transforms origin org backwards through warpzone wz, as the inverse of WarpZone_TransformOrigin.
Definition common.qc:526
vector WarpZone_TransformVelocity(entity wz, vector vel)
Transforms velocity v across warpzone wz.
Definition common.qc:495
entity WarpZone_trace_firstzone
First warpzone hit by a trace (can differ from the requested zone in case of _ThroughZone,...
Definition common.qh:41
entity WarpZone_trace_transform
Transform accumulator during a trace.
Definition common.qh:40
float vlen(vector v)
float min(float f,...)
void Send_Notification(NOTIF broadcast, entity client, MSG net_type, Notification net_name,...count)
Definition all.qc:1500
void FireRailgunBullet_cb(vector start, vector hit, vector end)
Updates the nearest point of the beam to each player, with the new segment from start to hit.
Definition tracing.qc:237
bool Headshot(entity targ, entity ent, vector start, vector end)
Definition tracing.qc:223
entity FireRailgunBullet_cb_this
Definition tracing.qc:235
IntrusiveList g_railgunhit
Definition tracing.qh:91
#define IS_SPEC(v)
Definition utils.qh:10
#define IS_REAL_CLIENT(v)
Definition utils.qh:17
#define FOREACH_CLIENT(cond, body)
Definition utils.qh:52
Weapon m_weapon
Definition wepent.qh:26

References antilag_debug, ANTILAG_LATENCY, CS(), Damage_DamageInfo(), dir, entity(), FireRailgunBullet_cb(), FireRailgunBullet_cb_this, FOREACH_CLIENT, g_railgunhit, Headshot(), IL_EACH, IL_PUSH(), IS_REAL_CLIENT, IS_SPEC, normalize(), NULL, SOLID_BSP, SOLID_NOT, trace_dphitq3surfaceflags, trace_endpos, trace_ent, trace_fraction, tracebox_antilag_force_wz(), vector, vlen(), WarpZone_trace_firstzone, WarpZone_trace_transform, WarpZone_TransformVelocity(), and WarpZone_UnTransformOrigin().

Referenced by W_OverkillNex_Attack(), W_Vaporizer_Attack(), and W_Vortex_Attack().

◆ STATIC_INIT() [1/2]

STATIC_INIT ( g_ctrace_changed )

Definition at line 118 of file tracing.qh.

119{
121}
#define IL_NEW()

References g_ctrace_changed, and IL_NEW.

◆ STATIC_INIT() [2/2]

STATIC_INIT ( g_railgunhit )

Definition at line 92 of file tracing.qh.

93{
95}

References g_railgunhit, and IL_NEW.

◆ traceline_antilag()

void traceline_antilag ( entity source,
vector v1,
vector v2,
float nomonst,
entity forent,
float lag )

Definition at line 203 of file antilag.qc.

204{
205 if (autocvar_g_antilag != 2 || (IS_CLIENT(source) && CS_CVAR(source).cvar_cl_noantilag))
206 lag = 0;
207 traceline_antilag_force(source, v1, v2, nomonsters, forent, lag);
208}
#define traceline_antilag_force(source, v1, v2, nomonsters, forent, lag)
Definition antilag.qh:31
int autocvar_g_antilag
Definition antilag.qh:5
#define IS_CLIENT(s)
Definition player.qh:241
#define CS_CVAR(this)
Definition state.qh:51

References autocvar_g_antilag, CS_CVAR, entity(), IS_CLIENT, traceline_antilag_force, and vector.

Referenced by crosshair_trace().

◆ W_CalculateProjectileVelocity()

vector W_CalculateProjectileVelocity ( entity actor,
vector pvelocity,
vector mvelocity,
float forceAbsolute )

Definition at line 177 of file tracing.qc.

178{
179 mvelocity *= W_WeaponSpeedFactor(actor);
180
181 vector mdirection = normalize(mvelocity);
182 float mspeed = vlen(mvelocity);
183
184 return get_shotvelocity(pvelocity, mdirection, mspeed, (forceAbsolute ? 0 : autocvar_g_projectiles_newton_style),
186}
vector get_shotvelocity(vector myvel, vector mydir, float spd, float newton_style, float mi, float ma)
Definition util.qc:1308
float autocvar_g_projectiles_newton_style_2_maxfactor
Definition tracing.qh:12
int autocvar_g_projectiles_newton_style
Definition tracing.qh:11
float autocvar_g_projectiles_newton_style_2_minfactor
Definition tracing.qh:13
float W_WeaponSpeedFactor(entity this)

References autocvar_g_projectiles_newton_style, autocvar_g_projectiles_newton_style_2_maxfactor, autocvar_g_projectiles_newton_style_2_minfactor, entity(), get_shotvelocity(), normalize(), vector, vlen(), and W_WeaponSpeedFactor().

Referenced by ctf_Handle_Throw(), IMPULSE(), kh_Key_DropAll(), kh_Key_DropOne(), powerups_DropItem(), toss_nade(), W_Nexball_Attack(), W_RocketMinsta_Attack(), and W_SetupProjVelocity_Explicit().

◆ W_SetupProjVelocity_Explicit()

void W_SetupProjVelocity_Explicit ( entity proj,
vector dir,
vector upDir,
float pSpeed,
float pUpSpeed,
float pZSpeed,
float spread,
float forceAbsolute )

Definition at line 188 of file tracing.qc.

189{
190 if (proj.owner == NULL)
191 error("Unowned missile");
192
193 dir += upDir * (pUpSpeed / pSpeed);
194 dir.z += pZSpeed / pSpeed;
195 pSpeed *= vlen(dir);
196 dir = normalize(dir);
197
198 #if 0
199 if (autocvar_g_projectiles_spread_style != mspercallsstyle)
200 {
201 mspercallsum = mspercallcount = 0;
202 mspercallsstyle = autocvar_g_projectiles_spread_style;
203 }
204 mspercallsum -= gettime(GETTIME_HIRES);
205 #endif
206
208
209 #if 0
210 mspercallsum += gettime(GETTIME_HIRES);
211 ++mspercallcount;
212 LOG_INFO("avg: ", ftos(mspercallcount / mspercallsum), " per sec");
213 #endif
214
215 proj.velocity = W_CalculateProjectileVelocity(proj.owner, proj.owner.velocity, pSpeed * dir, forceAbsolute);
216}
vector W_CalculateSpread(vector dir, float spread, int spread_style, bool must_normalize)
float GETTIME_HIRES
#define LOG_INFO(...)
Definition log.qh:62
float gettime(void)
string ftos(float f)
#define error
Definition pre.qh:6
vector W_CalculateProjectileVelocity(entity actor, vector pvelocity, vector mvelocity, float forceAbsolute)
Definition tracing.qc:177
int autocvar_g_projectiles_spread_style
Definition tracing.qh:14

References autocvar_g_projectiles_spread_style, dir, entity(), error, ftos(), gettime(), GETTIME_HIRES, LOG_INFO, normalize(), NULL, vector, vlen(), W_CalculateProjectileVelocity(), and W_CalculateSpread().

Referenced by FireGrapplingHook(), M_Golem_Attack_Lightning(), M_Spider_Attack_Web(), W_Blaster_Attack(), W_Crylink_Attack(), W_Crylink_Attack2(), and W_Hagar_Attack2_Load_Release().

◆ W_SetupShot_Dir_ProjectileSize_Range()

void W_SetupShot_Dir_ProjectileSize_Range ( entity ent,
.entity weaponentity,
vector s_forward,
vector mi,
vector ma,
float antilag,
float recoil,
Sound snd,
float chan,
float maxdamage,
float range,
int deathtype )

This function calculates w_shotorg and w_shotdir based on the weapon model offset, trueaim and antilag, and won't put w_shotorg inside a wall.

make sure you call makevectors first (FIXME?)

Definition at line 24 of file tracing.qc.

25{
26 TC(Sound, snd);
27 float nudge = 1; // added to traceline target and subtracted from result TOOD(divVerent): do we still need this? Doesn't the engine do this now for us?
28 float oldsolid = ent.dphitcontentsmask;
29 Weapon wep = DEATH_WEAPONOF(deathtype);
30 if (!IS_CLIENT(ent))
31 antilag = false; // no antilag for non-clients!
33 {
34 // This is the reason rifle, MG, OKMG and other fireBullet weapons don't hit the crosshair when shooting at walls.
35 // This is intentional, otherwise if you stand too close to a (glass) wall and attempt to shoot an enemy through it,
36 // trueaim will cause the shot to hit the wall exactly but then miss the enemy (unless shooting from eye/center).
37 // TODO for fireBullet, find how far the shot will penetrate and aim at that
38 // for fireRailgunbullet, find the farthest target and aim at that
39 // this will avoid issues when another player is passing in front of you when you shoot
40 // (currently such a shot will hit them but then miss the original target)
41 ent.dphitcontentsmask = DPCONTENTS_BODY | DPCONTENTS_CORPSE;
42 }
43 else
44 ent.dphitcontentsmask = DPCONTENTS_SOLID | DPCONTENTS_BODY | DPCONTENTS_CORPSE;
45 vector view_org = ent.origin + ent.view_ofs;
46 if (antilag)
47 WarpZone_traceline_antilag(NULL, view_org, view_org + s_forward * range, MOVE_NORMAL, ent, ANTILAG_LATENCY(ent));
48 // passing NULL, because we do NOT want it to touch dphitcontentsmask
49 else
50 WarpZone_TraceLine(view_org, view_org + s_forward * range, MOVE_NOMONSTERS, ent);
51 ent.dphitcontentsmask = DPCONTENTS_SOLID | DPCONTENTS_BODY | DPCONTENTS_CORPSE;
52
53 vector forward = v_forward;
54 vector right = v_right;
55 vector up = v_up;
57 v_forward = forward;
58 v_right = right;
59 v_up = up;
60
61 // un-adjust trueaim if shotend is too close
63 w_shotend = view_org + s_forward * autocvar_g_trueaim_minrange;
64
65 // track max damage
66 if (IS_PLAYER(ent) && accuracy_canbegooddamage(ent))
67 accuracy_add(ent, wep, maxdamage, 0, 0); // add to fired
68
69 if (IS_PLAYER(ent))
70 W_HitPlotAnalysis(ent, wep, forward, right, up);
71
72 // read shot origin offset, like g_shootfromcenter
73 // set in CL_WeaponEntity_SetModel (not a CSQC exclusive function...)
74 vector md = ent.(weaponentity).movedir;
75 //print(sprintf("offset of %s: %v\n", ent.(weaponentity).m_weapon.netname, md));
76 vector dv = right * -md.y + up * md.z;
77
78 w_shotorg = view_org;
79
80 // FIXME: account for warpzones
81 // move the shotorg sideways and vertically as much as requested if possible
82 if (antilag)
83 tracebox_antilag(ent, w_shotorg, mi, ma, w_shotorg + dv, MOVE_NORMAL, ent, (CS(ent).antilag_debug ? CS(ent).antilag_debug : ANTILAG_LATENCY(ent)));
84 else
85 tracebox(w_shotorg, mi, ma, w_shotorg + dv, MOVE_NORMAL, ent);
87
88 // now move the shotorg forward as much as requested if possible
89 if (antilag)
90 tracebox_antilag(ent, w_shotorg, mi, ma, w_shotorg + forward * (md.x + nudge), MOVE_NORMAL, ent, (CS(ent).antilag_debug ? CS(ent).antilag_debug : ANTILAG_LATENCY(ent)));
91 else
92 tracebox(w_shotorg, mi, ma, w_shotorg + forward * (md.x + nudge), MOVE_NORMAL, ent);
93 w_shotorg = trace_endpos - forward * nudge;
94
95 //print(sprintf("w_shotorg %v\n\n", w_shotorg - view_org));
96
97 // calculate the shotdir from the chosen shotorg
98 if (W_DualWielding(ent))
99 w_shotdir = s_forward;
100 else
102
103 //vector prevdir = w_shotdir;
104 //vector prevorg = w_shotorg;
105 //vector prevend = w_shotend;
106
107 if (antilag && !CS_CVAR(ent).cvar_cl_noantilag)
108 {
109 if (autocvar_g_antilag == 1) // switch to "ghost" if not hitting original
110 {
111 traceline(w_shotorg, w_shotorg + w_shotdir * range, MOVE_NORMAL, ent);
112 if (!trace_ent.takedamage)
113 {
115 if (trace_ent.takedamage && IS_PLAYER(trace_ent))
116 {
117 entity e = trace_ent;
118 traceline(w_shotorg, e.origin, MOVE_NORMAL, ent);
119 if (trace_ent == e)
121 }
122 }
123 }
124 else if (autocvar_g_antilag == 3) // client side hitscan
125 {
126 // this part MUST use prydon cursor
127 if (CS(ent).cursor_trace_ent // client was aiming at someone
128 && CS(ent).cursor_trace_ent != ent // just to make sure
129 && CS(ent).cursor_trace_ent.takedamage // and that person is killable
130 && IS_PLAYER(CS(ent).cursor_trace_ent)) // and actually a player
131 {
132 // verify that the shot would miss without antilag
133 // (avoids an issue where guns would always shoot at their origin)
134 traceline(w_shotorg, w_shotorg + w_shotdir * range, MOVE_NORMAL, ent);
135 if (!trace_ent.takedamage)
136 {
137 // verify that the shot would hit if altered
138 traceline(w_shotorg, CS(ent).cursor_trace_ent.origin, MOVE_NORMAL, ent);
139 if (trace_ent == CS(ent).cursor_trace_ent)
141 else
142 LOG_INFO("antilag fail");
143 }
144 }
145 }
146 }
147
148 ent.dphitcontentsmask = oldsolid; // restore solid type (generally SOLID_SLIDEBOX)
149
151 ent.punchangle_x = -recoil;
152
153 if (snd != SND_Null)
154 {
155 sound(ent, chan, snd, (W_DualWielding(ent) ? VOL_BASE * 0.7 : VOL_BASE), ATTN_NORM);
157 }
158
159 // nudge w_shotend so a trace to w_shotend hits
161 //if (w_shotend != prevend) printf("SERVER: shotEND differs: %s - %s\n", vtos(w_shotend), vtos(prevend));
162 //if (w_shotorg != prevorg) printf("SERVER: shotORG differs: %s - %s\n", vtos(w_shotorg), vtos(prevorg));
163 //if (w_shotdir != prevdir) printf("SERVER: shotDIR differs: %s - %s\n", vtos(w_shotdir), vtos(prevdir));
164}
bool accuracy_canbegooddamage(entity attacker)
if damage were to occur, would accuracy_isgooddamage be able to return true?
Definition accuracy.qc:154
void tracebox_antilag(entity source, vector v1, vector mi, vector ma, vector v2, float nomonsters, entity forent, float lag)
Definition antilag.qc:216
void WarpZone_traceline_antilag(entity source, vector v1, vector v2, float nomonsters, entity forent, float lag)
Definition antilag.qc:209
fields which are explicitly/manually set are marked with "M", fields set automatically are marked wit...
Definition weapon.qh:42
int spawnflags
M: flags : WEPSPAWNFLAG_... combined.
Definition weapon.qh:60
#define IS_PLAYER(s)
Definition player.qh:242
const float MOVE_NOMONSTERS
float DPCONTENTS_SOLID
float DPCONTENTS_CORPSE
float DPCONTENTS_BODY
vector v_right
const float ATTN_NORM
#define DEATH_WEAPONOF(t)
Definition all.qh:47
entity cursor_trace_ent
void W_HitPlotAnalysis(entity player, entity wep, vector screenforward, vector screenright, vector screenup)
Definition hitplot.qc:58
#define TC(T, sym)
Definition _all.inc:82
#define WarpZone_TraceLine(org, end, nomonsters, forent)
Definition common.qh:51
vector movedir
Definition viewloc.qh:18
void W_PlayStrengthSound(entity player)
Definition common.qc:40
bool W_DualWielding(entity player)
Definition common.qc:20
const float VOL_BASE
Definition sound.qh:36
#define sound(e, c, s, v, a)
Definition sound.qh:52
float autocvar_g_trueaim_minrange
Definition tracing.qh:17
bool autocvar_g_norecoil
Definition tracing.qh:16
vector w_shotorg
Definition tracing.qh:19
vector w_shotend
Definition tracing.qh:21
const int WEP_FLAG_PENETRATEWALLS
Definition weapon.qh:266

References accuracy_add(), accuracy_canbegooddamage(), antilag_debug, ANTILAG_LATENCY, ATTN_NORM, autocvar_g_antilag, autocvar_g_norecoil, autocvar_g_trueaim_minrange, CS(), CS_CVAR, cursor_trace_ent, DEATH_WEAPONOF, DPCONTENTS_BODY, DPCONTENTS_CORPSE, DPCONTENTS_SOLID, entity(), IS_CLIENT, IS_PLAYER, LOG_INFO, MOVE_NOMONSTERS, MOVE_NORMAL, movedir, normalize(), NULL, sound, Weapon::spawnflags, TC, trace_endpos, trace_ent, tracebox_antilag(), traceline_antilag_force, v_forward, v_right, v_up, vdist, vector, VOL_BASE, W_DualWielding(), W_HitPlotAnalysis(), W_PlayStrengthSound(), w_shotdir, w_shotend, w_shotorg, WarpZone_trace_transform, WarpZone_TraceLine, WarpZone_traceline_antilag(), WarpZone_UnTransformOrigin(), and WEP_FLAG_PENETRATEWALLS.

◆ W_SetupShot_GetAlternatingOffset()

vector W_SetupShot_GetAlternatingOffset ( int bullet_count)

Definition at line 166 of file tracing.qc.

167{
168 // Cycle of 4
169 vector offset = '0 37.5 -12.5';
170 if (bullet_count & 2)
171 offset.y = -offset.y;
172 if (bullet_count & 1)
173 offset.z = -offset.z;
174 return offset;
175}

References vector.

Referenced by W_Fireball_Attack2(), W_Fireball_AttackEffect(), W_Seeker_Fire_Flac(), and W_Seeker_Fire_Missile().

◆ WarpZone_crosshair_trace()

void WarpZone_crosshair_trace ( entity pl)

◆ WarpZone_crosshair_trace_plusvisibletriggers()

void WarpZone_crosshair_trace_plusvisibletriggers ( entity pl)

Variable Documentation

◆ autocvar_g_ballistics_density_corpse

float autocvar_g_ballistics_density_corpse

Definition at line 6 of file tracing.qh.

Referenced by PlayerDamage().

◆ autocvar_g_ballistics_density_player

float autocvar_g_ballistics_density_player

Definition at line 7 of file tracing.qh.

Referenced by PutPlayerInServer().

◆ autocvar_g_ballistics_mindistance

float autocvar_g_ballistics_mindistance

Definition at line 8 of file tracing.qh.

Referenced by fireBullet_falloff().

◆ autocvar_g_ballistics_penetrate_clips

bool autocvar_g_ballistics_penetrate_clips = true

Definition at line 9 of file tracing.qh.

Referenced by fireBullet_falloff().

◆ autocvar_g_ballistics_solidpenetration_exponent

float autocvar_g_ballistics_solidpenetration_exponent = 1

Definition at line 10 of file tracing.qh.

Referenced by fireBullet_falloff().

◆ autocvar_g_hitscan_spread_style

int autocvar_g_hitscan_spread_style

Definition at line 15 of file tracing.qh.

Referenced by fireBullet_falloff().

◆ autocvar_g_norecoil

◆ autocvar_g_projectiles_newton_style

int autocvar_g_projectiles_newton_style

Definition at line 11 of file tracing.qh.

Referenced by W_CalculateProjectileVelocity(), and W_Hook_Attack2().

◆ autocvar_g_projectiles_newton_style_2_maxfactor

float autocvar_g_projectiles_newton_style_2_maxfactor

Definition at line 12 of file tracing.qh.

Referenced by W_CalculateProjectileVelocity().

◆ autocvar_g_projectiles_newton_style_2_minfactor

float autocvar_g_projectiles_newton_style_2_minfactor

Definition at line 13 of file tracing.qh.

Referenced by W_CalculateProjectileVelocity().

◆ autocvar_g_projectiles_spread_style

int autocvar_g_projectiles_spread_style

Definition at line 14 of file tracing.qh.

Referenced by nades_CheckThrow(), and W_SetupProjVelocity_Explicit().

◆ autocvar_g_trueaim_minrange

float autocvar_g_trueaim_minrange

Definition at line 17 of file tracing.qh.

Referenced by ClientInit_misc(), and W_SetupShot_Dir_ProjectileSize_Range().

◆ ballistics_density

float ballistics_density

Definition at line 84 of file tracing.qh.

◆ fireBullet_last_hit

entity fireBullet_last_hit

Definition at line 102 of file tracing.qh.

Referenced by fireBullet_falloff(), and fireBullet_trace_callback().

◆ fireBullet_trace_callback_eff

entity fireBullet_trace_callback_eff

Definition at line 101 of file tracing.qh.

Referenced by fireBullet_falloff(), and fireBullet_trace_callback().

◆ g_ctrace_changed

IntrusiveList g_ctrace_changed

Definition at line 117 of file tracing.qh.

Referenced by crosshair_trace_plusvisibletriggers__is_wz(), and STATIC_INIT().

◆ g_railgunhit

IntrusiveList g_railgunhit

Definition at line 91 of file tracing.qh.

Referenced by FireImoBeam(), FireRailgunBullet(), STATIC_INIT(), and turret_tesla_toast().

◆ railgundistance

float railgundistance

Definition at line 97 of file tracing.qh.

◆ railgunforce

vector railgunforce

Definition at line 98 of file tracing.qh.

◆ railgunhit

bool railgunhit

Definition at line 87 of file tracing.qh.

◆ railgunhitloc

vector railgunhitloc

Definition at line 89 of file tracing.qh.

◆ railgunhitsolidbackup

float railgunhitsolidbackup

Definition at line 88 of file tracing.qh.

◆ w_shotdir

◆ w_shotend

vector w_shotend

Definition at line 21 of file tracing.qh.

Referenced by W_SetupShot_Dir_ProjectileSize_Range().

◆ w_shotorg