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)
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:192
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); }
#define W_SetupProjVelocity_SEC(ent, wep)
Definition tracing.qh:67
#define W_SetupProjVelocity_PRI(ent, wep)
Definition tracing.qh:65

Definition at line 70 of file tracing.qh.

70#define W_SetupProjVelocity_BOTH(ent, wep, isprimary) \
71 if(isprimary) { W_SetupProjVelocity_PRI(ent, wep); } \
72 else { 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:321

Definition at line 63 of file tracing.qh.

63#define W_SetupProjVelocity_PRE(ent, wep, prefix) \
64 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:322

Definition at line 65 of file tracing.qh.

65#define W_SetupProjVelocity_PRI(ent, wep) \
66 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:323

Definition at line 67 of file tracing.qh.

67#define W_SetupProjVelocity_SEC(ent, wep) \
68 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); }
#define W_SetupProjVelocity_UP_PRI(ent, wep)
Definition tracing.qh:54
#define W_SetupProjVelocity_UP_SEC(ent, wep)
Definition tracing.qh:56

Definition at line 59 of file tracing.qh.

59#define W_SetupProjVelocity_UP_BOTH(ent, wep, isprimary) \
60 if(isprimary) { W_SetupProjVelocity_UP_PRI(ent, wep); } \
61 else { 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)
Definition tracing.qc:24
int max_shot_distance
Definition weapon.qh:203

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

550{
552}
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 554 of file tracing.qc.

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

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

565{
567 {
568 if(it.model != "")
569 {
570 it.solid = SOLID_BSP;
572 }
573 });
574
575 if (is_wz)
577 else
578 crosshair_trace(pl);
579
580 IL_EACH(g_ctrace_changed, true, { it.solid = SOLID_TRIGGER; });
581
583}
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:549
void WarpZone_crosshair_trace(entity pl)
Definition tracing.qc:585
IntrusiveList g_ctrace_changed
Definition tracing.qh:110

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

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

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

540{
541 fireBullet_falloff(this, weaponentity, start, dir, spread, max_solid_penetration, damage, 0, 0, 0, headshot_multiplier, force, 0, dtype, tracer_effect, do_antilag);
542}
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:364

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

357{
358 if(vdist(hit - start, >, 16))
362}
#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:92
entity fireBullet_last_hit
Definition tracing.qh:93
#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 238 of file tracing.qc.

239{
240 vector dir = normalize(end - start);
241 vector force = dir * bforce;
242
243 // go a little bit into the wall because we need to hit this wall later
244 end = end + dir;
245
246 float totaldmg = 0;
247 bool headshot = false; // indicates that one of the targets hit was a headshot
248
249 // trace multiple times until we hit a wall, each obstacle will be made
250 // non-solid so we can hit the next, while doing this we spawn effects and
251 // note down which entities were hit so we can damage them later
252 entity o = this;
253 while (1)
254 {
255 if(CS(this).antilag_debug)
256 WarpZone_traceline_antilag (this, start, end, false, o, CS(this).antilag_debug);
257 else
258 WarpZone_traceline_antilag (this, start, end, false, o, ANTILAG_LATENCY(this));
260 {
261 o = NULL;
262 continue;
263 }
264
265 if(trace_ent.solid == SOLID_BSP || trace_ent.solid == SOLID_SLIDEBOX)
266 Damage_DamageInfo(trace_endpos, bdamage, 0, 0, force, deathtype, trace_ent.species, this);
267
268 // if it is NULL we can't hurt it so stop now
269 if (trace_ent == NULL || trace_fraction == 1)
270 break;
271
272 if(headshot_notify && !headshot && Headshot(trace_ent, this, start, end))
273 headshot = true;
274
275 // make the entity non-solid so we can hit the next one
277 trace_ent.railgunhit = true;
278 trace_ent.railgunhitloc = end;
279 trace_ent.railgunhitsolidbackup = trace_ent.solid;
282
283 // stop if this is a wall
284 if (trace_ent.solid == SOLID_BSP)
285 break;
286
287 // make the entity non-solid
288 trace_ent.solid = SOLID_NOT;
289 }
290
291 vector endpoint = trace_endpos;
292 entity endent = trace_ent;
293 float endq3surfaceflags = trace_dphitq3surfaceflags;
294
295 // find all the entities the railgun hit and restore their solid state
296 IL_EACH(g_railgunhit, it.railgunhit,
297 {
298 it.solid = it.railgunhitsolidbackup;
299 });
300
301 // Find all players the beam passed close by (even those hit)
302 float length = vlen(endpoint - start);
303 entity pseudoprojectile = NULL;
304 FOREACH_CLIENT(IS_REAL_CLIENT(it) && it != this, {
305 // not when spectating the shooter
306 if (IS_SPEC(it) && it.enemy == this) continue;
307
308 // nearest point on the beam
309 vector beampos = start + dir * bound(0, (it.origin - start) * dir, length);
310
311 if(!pseudoprojectile)
312 pseudoprojectile = new(pseudoprojectile); // we need this so the sound uses the "entchannel4" volume
313
314 msg_entity = it;
315 // we want this to be very loud when close but fall off quickly -> using max base volume and high attenuation
316 soundtoat(MSG_ONE, pseudoprojectile, beampos, CH_SHOTS, SND(NEXWHOOSH_RANDOM()), VOL_BASEVOICE, ATTEN_IDLE, 0);
317 });
318 if(pseudoprojectile)
319 delete(pseudoprojectile);
320
321 // find all the entities the railgun hit and hurt them
322 IL_EACH(g_railgunhit, it.railgunhit,
323 {
324 // removal from the list is handled below
325
326 float foff = ExponentialFalloff(mindist, maxdist, halflifedist, it.railgundistance);
327 float ffs = ExponentialFalloff(mindist, maxdist, forcehalflifedist, it.railgundistance);
328
329 if(accuracy_isgooddamage(this, it))
330 totaldmg += bdamage * foff;
331
332 // apply the damage
333 if (it.takedamage)
334 Damage(it, this, this, bdamage * foff, deathtype, weaponentity, it.railgunhitloc, it.railgunforce * ffs);
335
336 it.railgunhitloc = '0 0 0';
337 it.railgunhitsolidbackup = SOLID_NOT;
338 it.railgunhit = false;
339 it.railgundistance = 0;
340 });
341
343
344 if(headshot)
345 Send_Notification(NOTIF_ONE, this, MSG_ANNCE, ANNCE_HEADSHOT);
346
347 // calculate hits and fired shots for hitscan
348 if(this.(weaponentity))
349 accuracy_add(this, this.(weaponentity).m_weapon, 0, min(bdamage, totaldmg), 0); // add to hit
350
351 trace_endpos = endpoint;
352 trace_ent = endent;
353 trace_dphitq3surfaceflags = endq3surfaceflags;
354}
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:545
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:227
IntrusiveList g_railgunhit
Definition tracing.qh:85
#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:50
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 111 of file tracing.qh.

#define IL_NEW()

References g_ctrace_changed, and IL_NEW.

◆ STATIC_INIT() [2/2]

STATIC_INIT ( g_railgunhit )

Definition at line 86 of file tracing.qh.

86{ g_railgunhit = IL_NEW(); }

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:242
#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 176 of file tracing.qc.

177{
178 vector mdirection;
179 float mspeed;
180 vector outvelocity;
181
182 mvelocity = mvelocity * W_WeaponSpeedFactor(actor);
183
184 mdirection = normalize(mvelocity);
185 mspeed = vlen(mvelocity);
186
188
189 return outvelocity;
190}
vector get_shotvelocity(vector myvel, vector mydir, float spd, float newton_style, float mi, float ma)
Definition util.qc:1196
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 192 of file tracing.qc.

193{
194 if(proj.owner == NULL)
195 error("Unowned missile");
196
197 dir = dir + upDir * (pUpSpeed / pSpeed);
198 dir.z += pZSpeed / pSpeed;
199 pSpeed *= vlen(dir);
200 dir = normalize(dir);
201
202 #if 0
203 if(autocvar_g_projectiles_spread_style != mspercallsstyle)
204 {
205 mspercallsum = mspercallcount = 0;
206 mspercallsstyle = autocvar_g_projectiles_spread_style;
207 }
208 mspercallsum -= gettime(GETTIME_HIRES);
209 #endif
210
212
213 #if 0
214 mspercallsum += gettime(GETTIME_HIRES);
215 mspercallcount += 1;
216 LOG_INFO("avg: ", ftos(mspercallcount / mspercallsum), " per sec");
217 #endif
218
219 proj.velocity = W_CalculateProjectileVelocity(proj.owner, proj.owner.velocity, pSpeed * dir, forceAbsolute);
220}
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:176
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 )

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, right, up;
53 forward = v_forward;
54 right = v_right;
55 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
62 if(vdist(w_shotend - (ent.origin + ent.view_ofs), <, autocvar_g_trueaim_minrange))
63 w_shotend = ent.origin + ent.view_ofs + 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 = ent.origin + ent.view_ofs;
79
80 // move the shotorg sideways and vertically as much as requested if possible
81 if(antilag)
82 {
83 if(CS(ent).antilag_debug)
84 tracebox_antilag(ent, w_shotorg, mi, ma, w_shotorg + dv, MOVE_NORMAL, ent, CS(ent).antilag_debug);
85 else
86 tracebox_antilag(ent, w_shotorg, mi, ma, w_shotorg + dv, MOVE_NORMAL, ent, ANTILAG_LATENCY(ent));
87 }
88 else
89 tracebox(w_shotorg, mi, ma, w_shotorg + dv, MOVE_NORMAL, ent);
91
92 // now move the shotorg forward as much as requested if possible
93 if(antilag)
94 {
95 if(CS(ent).antilag_debug)
96 tracebox_antilag(ent, w_shotorg, mi, ma, w_shotorg + forward * (md.x + nudge), MOVE_NORMAL, ent, CS(ent).antilag_debug);
97 else
98 tracebox_antilag(ent, w_shotorg, mi, ma, w_shotorg + forward * (md.x + nudge), MOVE_NORMAL, ent, ANTILAG_LATENCY(ent));
99 }
100 else
101 tracebox(w_shotorg, mi, ma, w_shotorg + forward * (md.x + nudge), MOVE_NORMAL, ent);
102 w_shotorg = trace_endpos - forward * nudge;
103
104 //print(sprintf("w_shotorg %v\n\n", w_shotorg - (ent.origin + ent.view_ofs)));
105
106 // calculate the shotdir from the chosen shotorg
107 if(W_DualWielding(ent))
108 w_shotdir = s_forward;
109 else
111
112 //vector prevdir = w_shotdir;
113 //vector prevorg = w_shotorg;
114 //vector prevend = w_shotend;
115
116 if (antilag)
117 if (!CS_CVAR(ent).cvar_cl_noantilag)
118 {
119 if (autocvar_g_antilag == 1) // switch to "ghost" if not hitting original
120 {
121 traceline(w_shotorg, w_shotorg + w_shotdir * range, MOVE_NORMAL, ent);
122 if (!trace_ent.takedamage)
123 {
125 if (trace_ent.takedamage && IS_PLAYER(trace_ent))
126 {
127 entity e;
128 e = trace_ent;
129 traceline(w_shotorg, e.origin, MOVE_NORMAL, ent);
130 if(trace_ent == e)
132 }
133 }
134 }
135 else if(autocvar_g_antilag == 3) // client side hitscan
136 {
137 // this part MUST use prydon cursor
138 if (CS(ent).cursor_trace_ent) // client was aiming at someone
139 if (CS(ent).cursor_trace_ent != ent) // just to make sure
140 if (CS(ent).cursor_trace_ent.takedamage) // and that person is killable
141 if (IS_PLAYER(CS(ent).cursor_trace_ent)) // and actually a player
142 {
143 // verify that the shot would miss without antilag
144 // (avoids an issue where guns would always shoot at their origin)
145 traceline(w_shotorg, w_shotorg + w_shotdir * range, MOVE_NORMAL, ent);
146 if (!trace_ent.takedamage)
147 {
148 // verify that the shot would hit if altered
149 traceline(w_shotorg, CS(ent).cursor_trace_ent.origin, MOVE_NORMAL, ent);
150 if (trace_ent == CS(ent).cursor_trace_ent)
152 else
153 LOG_INFO("antilag fail");
154 }
155 }
156 }
157 }
158
159 ent.dphitcontentsmask = oldsolid; // restore solid type (generally SOLID_SLIDEBOX)
160
162 ent.punchangle_x = recoil * -1;
163
164 if (snd != SND_Null) {
165 sound(ent, chan, snd, (W_DualWielding(ent) ? VOL_BASE * 0.7 : VOL_BASE), ATTN_NORM);
167 }
168
169 // nudge w_shotend so a trace to w_shotend hits
171 //if(w_shotend != prevend) { printf("SERVER: shotEND differs: %s - %s\n", vtos(w_shotend), vtos(prevend)); }
172 //if(w_shotorg != prevorg) { printf("SERVER: shotORG differs: %s - %s\n", vtos(w_shotorg), vtos(prevorg)); }
173 //if(w_shotdir != prevdir) { printf("SERVER: shotDIR differs: %s - %s\n", vtos(w_shotdir), vtos(prevdir)); }
174}
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:44
int spawnflags
M: flags : WEPSPAWNFLAG_... combined.
Definition weapon.qh:55
#define IS_PLAYER(s)
Definition player.qh:243
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:224

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()

◆ WarpZone_crosshair_trace_plusvisibletriggers()

void WarpZone_crosshair_trace_plusvisibletriggers ( entity pl)

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

◆ fireBullet_last_hit

entity fireBullet_last_hit

Definition at line 93 of file tracing.qh.

Referenced by fireBullet_falloff(), and fireBullet_trace_callback().

◆ fireBullet_trace_callback_eff

entity fireBullet_trace_callback_eff

Definition at line 92 of file tracing.qh.

Referenced by fireBullet_falloff(), and fireBullet_trace_callback().

◆ g_ctrace_changed

IntrusiveList g_ctrace_changed

Definition at line 110 of file tracing.qh.

Referenced by crosshair_trace_plusvisibletriggers__is_wz(), and STATIC_INIT().

◆ g_railgunhit

IntrusiveList g_railgunhit

Definition at line 85 of file tracing.qh.

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

◆ railgundistance

float railgundistance

Definition at line 88 of file tracing.qh.

◆ railgunforce

vector railgunforce

Definition at line 89 of file tracing.qh.

◆ railgunhit

bool railgunhit

Definition at line 81 of file tracing.qh.

◆ railgunhitloc

vector railgunhitloc

Definition at line 83 of file tracing.qh.

◆ railgunhitsolidbackup

float railgunhitsolidbackup

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