From: Mario Date: Sat, 7 Sep 2019 10:57:25 +0000 (+1000) Subject: Apply invisibility to crosshair chase, fixes players becoming more visible when their... X-Git-Tag: xonotic-v0.8.5~1299 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=342513769806220e64c41727fc526fb8967482ce;p=xonotic%2Fxonotic-data.pk3dir.git Apply invisibility to crosshair chase, fixes players becoming more visible when their crosshair is obstructed --- diff --git a/qcsrc/client/view.qc b/qcsrc/client/view.qc index a992d36a4..33f7e9ba4 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; }