From 342513769806220e64c41727fc526fb8967482ce Mon Sep 17 00:00:00 2001 From: Mario Date: Sat, 7 Sep 2019 20:57:25 +1000 Subject: [PATCH] Apply invisibility to crosshair chase, fixes players becoming more visible when their crosshair is obstructed --- qcsrc/client/view.qc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/qcsrc/client/view.qc b/qcsrc/client/view.qc index a992d36a48..33f7e9ba4a 100644 --- a/qcsrc/client/view.qc +++ b/qcsrc/client/view.qc @@ -980,8 +980,9 @@ void HUD_Crosshair(entity this) if(csqcplayer && crosshair_chase_playeralpha && crosshair_chase_playeralpha < 1) { traceline(view_origin, view_origin + max_shot_distance * view_forward, MOVE_NORMAL, NULL); + float myalpha = (!csqcplayer.m_alpha) ? 1 : csqcplayer.m_alpha; if(trace_ent == csqcplayer && STAT(HEALTH) > 0) - csqcplayer.alpha = crosshair_chase_playeralpha; + csqcplayer.alpha = min(crosshair_chase_playeralpha, myalpha); else csqcplayer.alpha = csqcplayer.m_alpha; } -- 2.39.2