Add alive check to localplayer

This commit is contained in:
8dcc 2023-07-31 16:10:47 +02:00
parent 865a02a8cd
commit 51c302f492
1 changed files with 2 additions and 1 deletions

View File

@ -32,7 +32,8 @@ void custom_crosshair(void) {
void bullet_tracers(usercmd_t* cmd) { void bullet_tracers(usercmd_t* cmd) {
/* Only draw if we are holding attack and we can shoot */ /* Only draw if we are holding attack and we can shoot */
if (!CVAR_ON(tracers) || !(cmd->buttons & IN_ATTACK) || !can_shoot()) if (!CVAR_ON(tracers) || !(cmd->buttons & IN_ATTACK) || !can_shoot() ||
!is_alive(localplayer))
return; return;
/* Get player eye pos, start of tracer */ /* Get player eye pos, start of tracer */