]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix name above dead players not starting to fade out from the current player's alpha...
authorterencehill <piuntn@gmail.com>
Mon, 18 May 2020 21:55:13 +0000 (23:55 +0200)
committerterencehill <piuntn@gmail.com>
Mon, 18 May 2020 21:55:13 +0000 (23:55 +0200)
qcsrc/client/shownames.qc

index 20526d2c3fce3e09988843c39a068aae08b70445..c2fc8a8063cf69ab4533baf49186b10a49765200 100644 (file)
@@ -119,14 +119,12 @@ void Draw_ShowNames(entity this)
                this.alpha = min(1, this.alpha + SHOWNAMES_FADESPEED * frametime);
        }
        float a = autocvar_hud_shownames_alpha * this.alpha;
-       // multiply by player alpha
        if (!this.sameteam || (this.sv_entnum == player_localentnum))
        {
                float f = entcs_GetAlpha(this.sv_entnum - 1);
                if (f == 0) f = 1;
                if (f < 0) f = 0;
-               // FIXME: alpha is negative when dead, breaking death fade
-               if (!this.csqcmodel_isdead) a *= f;
+               a *= f;
        }
        if (a < ALPHA_MIN_VISIBLE && ISGAMETYPE(CTS)) return;
        if (vdist(this.origin - view_origin, >=, max_shot_distance)) return;