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.
void WarpZone_crosshair_trace (entity pl)
void WarpZone_crosshair_trace_plusvisibletriggers (entity pl)
void WarpZone_traceline_antilag (entity source, vector v1, vector v2, float nomonst, entity forent, float lag)

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:185
vector w_shotdir
Definition tracing.qh:20

Definition at line 49 of file tracing.qh.

49#define W_SetupProjVelocity_Basic(ent,pspeed,pspread) \
50 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 72 of file tracing.qh.

72#define W_SetupProjVelocity_BOTH(ent, wep, isprimary) \
73 if (isprimary) \
74 W_SetupProjVelocity_PRI(ent, wep); \
75 else \
76 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 65 of file tracing.qh.

65#define W_SetupProjVelocity_PRE(ent, wep, prefix) \
66 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:
W_SetupProjVelocity_Explicit(ent, w_shotdir, v_up, WEP_CVAR_PRI(wep, speed), 0, 0, WEP_CVAR_PRI(wep, spread), false)
#define WEP_CVAR_PRI(wep, name)
Definition all.qh:338

Definition at line 67 of file tracing.qh.

67#define W_SetupProjVelocity_PRI(ent, wep) \
68 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:
W_SetupProjVelocity_Explicit(ent, w_shotdir, v_up, WEP_CVAR_SEC(wep, speed), 0, 0, WEP_CVAR_SEC(wep, spread), false)
#define WEP_CVAR_SEC(wep, name)
Definition all.qh:339

Definition at line 69 of file tracing.qh.

69#define W_SetupProjVelocity_SEC(ent, wep) \
70 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 59 of file tracing.qh.

59#define W_SetupProjVelocity_UP_BOTH(ent, wep, isprimary) \
60 if (isprimary) \
61 W_SetupProjVelocity_UP_PRI(ent, wep); \
62 else \
63 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 52 of file tracing.qh.

52#define W_SetupProjVelocity_UP_PRE(ent, wep, prefix) \
53 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 54 of file tracing.qh.

54#define W_SetupProjVelocity_UP_PRI(ent, wep) \
55 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 56 of file tracing.qh.

56#define W_SetupProjVelocity_UP_SEC(ent, wep) \
57 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(), toss_nade(), 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_Attack(), 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(), 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_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 542 of file tracing.qc.

543{
545}
void traceline_antilag(entity source, vector v1, vector v2, float nomonst, entity forent, float lag)
Definition antilag.qc:203
#define ANTILAG_LATENCY(e)
Definition antilag.qh:19
const float MOVE_NORMAL
vector cursor_trace_start
vector cursor_trace_endpos
vector normalize(vector v)
ClientState CS(Client this)
Definition state.qh:47

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

Referenced by bumblebee_gunner_frame(), bumblebee_pilot_frame(), CheatCommand(), crosshair_trace_plusvisibletriggers__is_wz(), MUTATOR_HOOKFUNCTION(), 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 547 of file tracing.qc.

548{
550}
void crosshair_trace_plusvisibletriggers__is_wz(entity pl, bool is_wz)
Definition tracing.qc:557

References crosshair_trace_plusvisibletriggers__is_wz(), and entity().

Referenced by Drag(), and sandbox_ObjectEdit_Get().

◆ crosshair_trace_plusvisibletriggers__is_wz()

void crosshair_trace_plusvisibletriggers__is_wz ( entity pl,
bool is_wz )

Definition at line 557 of file tracing.qc.

558{
560 {
561 if (it.model != "")
562 {
563 it.solid = SOLID_BSP;
565 }
566 });
567
568 if (is_wz)
570 else
571 crosshair_trace(pl);
572
573 IL_EACH(g_ctrace_changed, true, it.solid = SOLID_TRIGGER);
574
576}
const float SOLID_TRIGGER
const float SOLID_BSP
solid
Definition ent_cs.qc:165
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:542
void WarpZone_crosshair_trace(entity pl)
Definition tracing.qc:578
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 537 of file tracing.qc.

538{
539 fireBullet_antilag(this, weaponentity, start, dir, spread, max_solid_penetration, damage, headshot_multiplier, force, dtype, tracer_effect, true);
540}
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:532

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 532 of file tracing.qc.

533{
534 fireBullet_falloff(this, weaponentity, start, dir, spread, max_solid_penetration, damage, 0, 0, 0, headshot_multiplier, force, 0, dtype, tracer_effect, do_antilag);
535}
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:356

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 348 of file tracing.qc.

349{
350 if (vdist(hit - start, >, 16))
354}
#define trailparticles(e, effect, org, vel)
Definition effect.qh:9
entity WarpZone_trace_forent
Definition common.qh:34
#define NULL
Definition post.qh:14
entity fireBullet_trace_callback_eff
Definition tracing.qh:99
entity fireBullet_last_hit
Definition tracing.qh:100
#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 231 of file tracing.qc.

232{
233 vector dir = normalize(end - start);
234 vector force = dir * bforce;
235
236 // go a little bit into the wall because we need to hit this wall later
237 end += dir;
238
239 float totaldmg = 0;
240 bool headshot = false; // indicates that one of the targets hit was a headshot
241
242 // trace multiple times until we hit a wall, each obstacle will be made
243 // non-solid so we can hit the next, while doing this we spawn effects and
244 // note down which entities were hit so we can damage them later
245 entity o = this;
246 while (1)
247 {
248 if (CS(this).antilag_debug)
249 WarpZone_traceline_antilag (this, start, end, false, o, CS(this).antilag_debug);
250 else
251 WarpZone_traceline_antilag (this, start, end, false, o, ANTILAG_LATENCY(this));
253 {
254 o = NULL;
255 continue;
256 }
257
258 if (trace_ent.solid == SOLID_BSP || trace_ent.solid == SOLID_SLIDEBOX)
259 Damage_DamageInfo(trace_endpos, bdamage, 0, 0, force, deathtype, trace_ent.species, this);
260
261 // if it is NULL we can't hurt it so stop now
262 if (trace_ent == NULL || trace_fraction == 1)
263 break;
264
265 if (headshot_notify && !headshot && Headshot(trace_ent, this, start, end))
266 headshot = true;
267
268 // make the entity non-solid so we can hit the next one
270 trace_ent.railgunhit = true;
271 trace_ent.railgunhitloc = end;
272 trace_ent.railgunhitsolidbackup = trace_ent.solid;
275
276 // stop if this is a wall
277 if (trace_ent.solid == SOLID_BSP)
278 break;
279
280 // make the entity non-solid
281 trace_ent.solid = SOLID_NOT;
282 }
283
284 vector endpoint = trace_endpos;
285 entity endent = trace_ent;
286 float endq3surfaceflags = trace_dphitq3surfaceflags;
287
288 // find all the entities the railgun hit and restore their solid state
289 IL_EACH(g_railgunhit, it.railgunhit, it.solid = it.railgunhitsolidbackup);
290
291 // Find all players the beam passed close by (even those hit)
292 float length = vlen(endpoint - start);
293 entity pseudoprojectile = NULL;
294 FOREACH_CLIENT(IS_REAL_CLIENT(it) && it != this,
295 {
296 // not when spectating the shooter
297 if (IS_SPEC(it) && it.enemy == this)
298 continue;
299
300 // nearest point on the beam
301 vector beampos = start + dir * bound(0, (it.origin - start) * dir, length);
302
303 if (!pseudoprojectile)
304 pseudoprojectile = new(pseudoprojectile); // we need this so the sound uses the "entchannel4" volume
305
306 msg_entity = it;
307 // we want this to be very loud when close but fall off quickly -> using max base volume and high attenuation
308 soundtoat(MSG_ONE, pseudoprojectile, beampos, CH_SHOTS, SND(NEXWHOOSH_RANDOM()), VOL_BASEVOICE, ATTEN_IDLE, 0);
309 });
310 if (pseudoprojectile)
311 delete(pseudoprojectile);
312
313 // find all the entities the railgun hit and hurt them
314 IL_EACH(g_railgunhit, it.railgunhit,
315 {
316 // removal from the list is handled below
317
318 float foff = ExponentialFalloff(mindist, maxdist, halflifedist, it.railgundistance);
319 float ffs = ExponentialFalloff(mindist, maxdist, forcehalflifedist, it.railgundistance);
320
321 if (accuracy_isgooddamage(this, it))
322 totaldmg += bdamage * foff;
323
324 // apply the damage
325 if (it.takedamage)
326 Damage(it, this, this, bdamage * foff, deathtype, weaponentity, it.railgunhitloc, it.railgunforce * ffs);
327
328 it.railgunhitloc = '0 0 0';
329 it.railgunhitsolidbackup = SOLID_NOT;
330 it.railgunhit = false;
331 it.railgundistance = 0;
332 });
333
335
336 if (headshot)
337 Send_Notification(NOTIF_ONE, this, MSG_ANNCE, ANNCE_HEADSHOT);
338
339 // calculate hits and fired shots for hitscan
340 if (this.(weaponentity))
341 accuracy_add(this, this.(weaponentity).m_weapon, 0, min(bdamage, totaldmg), 0); // add to hit
342
343 trace_endpos = endpoint;
344 trace_ent = endent;
345 trace_dphitq3surfaceflags = endq3surfaceflags;
346}
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:19
void WarpZone_traceline_antilag(entity source, vector v1, vector v2, float nomonst, entity forent, float lag)
Definition antilag.qc:221
var entity(vector mins, vector maxs,.entity tofield) findbox_tofield_OrFallback
const float SOLID_SLIDEBOX
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_TransformVelocity(entity wz, vector v)
Definition common.qc:514
vector WarpZone_UnTransformOrigin(entity wz, vector v)
Definition common.qc:544
entity WarpZone_trace_firstzone
Definition common.qh:38
entity WarpZone_trace_transform
Definition common.qh:37
float MSG_ONE
Definition menudefs.qc:56
float bound(float min, float value, float max)
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:1573
entity msg_entity
Definition progsdefs.qc:63
vector
Definition self.qh:92
const float VOL_BASEVOICE
Definition sound.qh:37
const int CH_SHOTS
Definition sound.qh:14
const float ATTEN_IDLE
Definition sound.qh:32
void soundtoat(int to, entity e, vector o, int chan, string samp, float vol, float attenu, float _pitch)
Definition all.qc:39
#define SND(id)
Definition all.qh:35
bool Headshot(entity targ, entity ent, vector start, vector end)
Definition tracing.qc:220
IntrusiveList g_railgunhit
Definition tracing.qh:89
#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 accuracy_add(), antilag_debug, ANTILAG_LATENCY, ATTEN_IDLE, bound(), CH_SHOTS, CS(), Damage_DamageInfo(), dir, entity(), FOREACH_CLIENT, g_railgunhit, Headshot(), IL_CLEAR, IL_EACH, IL_PUSH(), IS_REAL_CLIENT, IS_SPEC, m_weapon, min(), msg_entity, MSG_ONE, normalize(), NULL, Send_Notification(), SND, SOLID_BSP, SOLID_NOT, SOLID_SLIDEBOX, soundtoat(), trace_dphitq3surfaceflags, trace_endpos, trace_ent, trace_fraction, vector, vlen(), VOL_BASEVOICE, WarpZone_trace_firstzone, WarpZone_trace_transform, WarpZone_traceline_antilag(), 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 90 of file tracing.qh.

91{
93}

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 bool noantilag = ((IS_CLIENT(source)) ? CS_CVAR(source).cvar_cl_noantilag : false);
206 if (autocvar_g_antilag != 2 || noantilag)
207 lag = 0;
208 traceline_antilag_force(source, v1, v2, nomonst, forent, lag);
209}
void traceline_antilag_force(entity source, vector v1, vector v2, float nomonst, entity forent, float lag)
Definition antilag.qc:199
int autocvar_g_antilag
Definition antilag.qh:3
#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 174 of file tracing.qc.

175{
176 mvelocity *= W_WeaponSpeedFactor(actor);
177
178 vector mdirection = normalize(mvelocity);
179 float mspeed = vlen(mvelocity);
180
181 return get_shotvelocity(pvelocity, mdirection, mspeed, (forceAbsolute ? 0 : autocvar_g_projectiles_newton_style),
183}
vector get_shotvelocity(vector myvel, vector mydir, float spd, float newton_style, float mi, float ma)
Definition util.qc:1296
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 185 of file tracing.qc.

186{
187 if (proj.owner == NULL)
188 error("Unowned missile");
189
190 dir += upDir * (pUpSpeed / pSpeed);
191 dir.z += pZSpeed / pSpeed;
192 pSpeed *= vlen(dir);
193 dir = normalize(dir);
194
195 #if 0
196 if (autocvar_g_projectiles_spread_style != mspercallsstyle)
197 {
198 mspercallsum = mspercallcount = 0;
199 mspercallsstyle = autocvar_g_projectiles_spread_style;
200 }
201 mspercallsum -= gettime(GETTIME_HIRES);
202 #endif
203
205
206 #if 0
207 mspercallsum += gettime(GETTIME_HIRES);
208 ++mspercallcount;
209 LOG_INFO("avg: ", ftos(mspercallcount / mspercallsum), " per sec");
210 #endif
211
212 proj.velocity = W_CalculateProjectileVelocity(proj.owner, proj.owner.velocity, pSpeed * dir, forceAbsolute);
213}
vector W_CalculateSpread(vector dir, float spread, int spread_style, bool must_normalize)
float GETTIME_HIRES
#define LOG_INFO(...)
Definition log.qh:65
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:174
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 if (antilag)
46 WarpZone_traceline_antilag(NULL, ent.origin + ent.view_ofs, ent.origin + ent.view_ofs + s_forward * range, MOVE_NORMAL, ent, ANTILAG_LATENCY(ent));
47 // passing NULL, because we do NOT want it to touch dphitcontentsmask
48 else
49 WarpZone_TraceLine(ent.origin + ent.view_ofs, ent.origin + ent.view_ofs + s_forward * range, MOVE_NOMONSTERS, ent);
50 ent.dphitcontentsmask = DPCONTENTS_SOLID | DPCONTENTS_BODY | DPCONTENTS_CORPSE;
51
52 vector forward = v_forward;
53 vector right = v_right;
54 vector up = v_up;
56 v_forward = forward;
57 v_right = right;
58 v_up = up;
59
60 // un-adjust trueaim if shotend is too close
61 if (vdist(w_shotend - (ent.origin + ent.view_ofs), <, autocvar_g_trueaim_minrange))
62 w_shotend = ent.origin + ent.view_ofs + s_forward * autocvar_g_trueaim_minrange;
63
64 // track max damage
65 if (IS_PLAYER(ent) && accuracy_canbegooddamage(ent))
66 accuracy_add(ent, wep, maxdamage, 0, 0); // add to fired
67
68 if (IS_PLAYER(ent))
69 W_HitPlotAnalysis(ent, wep, forward, right, up);
70
71 // read shot origin offset, like g_shootfromcenter
72 // set in CL_WeaponEntity_SetModel (not a CSQC exclusive function...)
73 vector md = ent.(weaponentity).movedir;
74 //print(sprintf("offset of %s: %v\n", ent.(weaponentity).m_weapon.netname, md));
75 vector dv = right * -md.y + up * md.z;
76
77 w_shotorg = ent.origin + ent.view_ofs;
78
79 // move the shotorg sideways and vertically as much as requested if possible
80 if (antilag)
81 {
82 if (CS(ent).antilag_debug)
83 tracebox_antilag(ent, w_shotorg, mi, ma, w_shotorg + dv, MOVE_NORMAL, ent, CS(ent).antilag_debug);
84 else
85 tracebox_antilag(ent, w_shotorg, mi, ma, w_shotorg + dv, MOVE_NORMAL, ent, ANTILAG_LATENCY(ent));
86 }
87 else
88 tracebox(w_shotorg, mi, ma, w_shotorg + dv, MOVE_NORMAL, ent);
90
91 // now move the shotorg forward as much as requested if possible
92 if (antilag)
93 {
94 if (CS(ent).antilag_debug)
95 tracebox_antilag(ent, w_shotorg, mi, ma, w_shotorg + forward * (md.x + nudge), MOVE_NORMAL, ent, CS(ent).antilag_debug);
96 else
97 tracebox_antilag(ent, w_shotorg, mi, ma, w_shotorg + forward * (md.x + nudge), MOVE_NORMAL, ent, ANTILAG_LATENCY(ent));
98 }
99 else
100 tracebox(w_shotorg, mi, ma, w_shotorg + forward * (md.x + nudge), MOVE_NORMAL, ent);
101 w_shotorg = trace_endpos - forward * nudge;
102
103 //print(sprintf("w_shotorg %v\n\n", w_shotorg - (ent.origin + ent.view_ofs)));
104
105 // calculate the shotdir from the chosen shotorg
106 if (W_DualWielding(ent))
107 w_shotdir = s_forward;
108 else
110
111 //vector prevdir = w_shotdir;
112 //vector prevorg = w_shotorg;
113 //vector prevend = w_shotend;
114
115 if (antilag && !CS_CVAR(ent).cvar_cl_noantilag)
116 {
117 if (autocvar_g_antilag == 1) // switch to "ghost" if not hitting original
118 {
119 traceline(w_shotorg, w_shotorg + w_shotdir * range, MOVE_NORMAL, ent);
120 if (!trace_ent.takedamage)
121 {
123 if (trace_ent.takedamage && IS_PLAYER(trace_ent))
124 {
125 entity e = trace_ent;
126 traceline(w_shotorg, e.origin, MOVE_NORMAL, ent);
127 if (trace_ent == e)
129 }
130 }
131 }
132 else if (autocvar_g_antilag == 3) // client side hitscan
133 {
134 // this part MUST use prydon cursor
135 if (CS(ent).cursor_trace_ent // client was aiming at someone
136 && CS(ent).cursor_trace_ent != ent // just to make sure
137 && CS(ent).cursor_trace_ent.takedamage // and that person is killable
138 && IS_PLAYER(CS(ent).cursor_trace_ent)) // and actually a player
139 {
140 // verify that the shot would miss without antilag
141 // (avoids an issue where guns would always shoot at their origin)
142 traceline(w_shotorg, w_shotorg + w_shotdir * range, MOVE_NORMAL, ent);
143 if (!trace_ent.takedamage)
144 {
145 // verify that the shot would hit if altered
146 traceline(w_shotorg, CS(ent).cursor_trace_ent.origin, MOVE_NORMAL, ent);
147 if (trace_ent == CS(ent).cursor_trace_ent)
149 else
150 LOG_INFO("antilag fail");
151 }
152 }
153 }
154 }
155
156 ent.dphitcontentsmask = oldsolid; // restore solid type (generally SOLID_SLIDEBOX)
157
159 ent.punchangle_x = -recoil;
160
161 if (snd != SND_Null)
162 {
163 sound(ent, chan, snd, (W_DualWielding(ent) ? VOL_BASE * 0.7 : VOL_BASE), ATTN_NORM);
165 }
166
167 // nudge w_shotend so a trace to w_shotend hits
169 //if (w_shotend != prevend) printf("SERVER: shotEND differs: %s - %s\n", vtos(w_shotend), vtos(prevend));
170 //if (w_shotorg != prevorg) printf("SERVER: shotORG differs: %s - %s\n", vtos(w_shotorg), vtos(prevorg));
171 //if (w_shotdir != prevdir) printf("SERVER: shotDIR differs: %s - %s\n", vtos(w_shotdir), vtos(prevdir));
172}
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 nomonst, entity forent, float lag)
Definition antilag.qc:210
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:45
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
void WarpZone_TraceLine(vector org, vector end, float nomonsters, entity forent)
Definition common.qc:348
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.

◆ WarpZone_crosshair_trace()

void WarpZone_crosshair_trace ( entity pl)

Definition at line 578 of file tracing.qc.

579{
580 vector trace_start = CS(pl).cursor_trace_start;
581 WarpZone_traceline_antilag(pl, trace_start, trace_start + normalize(CS(pl).cursor_trace_endpos - trace_start) * max_shot_distance, MOVE_NORMAL, pl, ANTILAG_LATENCY(pl));
582}

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

Referenced by crosshair_trace_plusvisibletriggers__is_wz(), crosshair_trace_waypoints(), IMPULSE(), and IMPULSE().

◆ WarpZone_crosshair_trace_plusvisibletriggers()

void WarpZone_crosshair_trace_plusvisibletriggers ( entity pl)

Definition at line 552 of file tracing.qc.

References crosshair_trace_plusvisibletriggers__is_wz(), and entity().

Referenced by formatmessage(), IMPULSE(), and show_entnum().

◆ WarpZone_traceline_antilag()

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

Definition at line 221 of file antilag.qc.

222{
223 bool noantilag = ((IS_CLIENT(source)) ? CS_CVAR(source).cvar_cl_noantilag : false);
224 if (autocvar_g_antilag != 2 || noantilag)
225 lag = 0;
226 WarpZone_traceline_antilag_force(source, v1, v2, nomonst, forent, lag);
227}
void WarpZone_traceline_antilag_force(entity source, vector v1, vector v2, float nomonst, entity forent, float lag)
Definition antilag.qc:217

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

Referenced by FireRailgunBullet(), W_Arc_Beam_Think(), W_SetupShot_Dir_ProjectileSize_Range(), W_Shotgun_Melee_Think(), and WarpZone_crosshair_trace().

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 82 of file tracing.qh.

◆ fireBullet_last_hit

entity fireBullet_last_hit

Definition at line 100 of file tracing.qh.

Referenced by fireBullet_falloff(), and fireBullet_trace_callback().

◆ fireBullet_trace_callback_eff

entity fireBullet_trace_callback_eff

Definition at line 99 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 89 of file tracing.qh.

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

◆ railgundistance

float railgundistance

Definition at line 95 of file tracing.qh.

◆ railgunforce

vector railgunforce

Definition at line 96 of file tracing.qh.

◆ railgunhit

bool railgunhit

Definition at line 85 of file tracing.qh.

◆ railgunhitloc

vector railgunhitloc

Definition at line 87 of file tracing.qh.

◆ railgunhitsolidbackup

float railgunhitsolidbackup

Definition at line 86 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