]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Apply invisibility to crosshair chase, fixes players becoming more visible when their...
authorMario <mario@smbclan.net>
Sat, 7 Sep 2019 10:57:25 +0000 (20:57 +1000)
committerMario <mario@smbclan.net>
Sat, 7 Sep 2019 10:57:25 +0000 (20:57 +1000)
qcsrc/client/view.qc

index a992d36a4858a114a8934df8dad348c275095726..33f7e9ba4aaec09997ceeffe21a2dcdc186096db 100644 (file)
@@ -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;
                        }