]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Shownames: restore an early alpha check that was made exclusive to CTS by mistake...
authorterencehill <piuntn@gmail.com>
Fri, 23 Aug 2024 22:11:24 +0000 (00:11 +0200)
committerterencehill <piuntn@gmail.com>
Fri, 23 Aug 2024 22:11:24 +0000 (00:11 +0200)
qcsrc/client/shownames.qc
qcsrc/common/gamemodes/gamemode/cts/cl_cts.qc

index 3f0688d61d0e4a2c577ae2ae10660197ccd18380..45496e87987d9deeb436d578fceba4af7d1a66cd 100644 (file)
@@ -138,6 +138,9 @@ void Draw_ShowNames(entity this)
        }
        if (MUTATOR_CALLHOOK(ShowNames_Draw, this, a)) return;
        a = M_ARGV(1, float);
+
+       if (a < ALPHA_MIN_VISIBLE) return;
+
        float dist = -1; // dist will be calculated only when really needed to avoid wasting a vlen call
        if (autocvar_hud_shownames_maxdistance)
        {
index ce095bf2032a0e1a63fccaaac1fc0c3840d91148..1af406f3129224c59c9f4ed3005c71f88cf96de5 100644 (file)
@@ -43,11 +43,6 @@ MUTATOR_HOOKFUNCTION(cl_cts, ShowRankings)
        }
 }
 
-MUTATOR_HOOKFUNCTION(cl_cts, ShowNames_Draw)
-{
-       return (ISGAMETYPE(CTS) && M_ARGV(1, float) < ALPHA_MIN_VISIBLE);
-}
-
 MUTATOR_HOOKFUNCTION(cl_cts, ShowRaceTimer)
 {
        return ISGAMETYPE(CTS); // show the race timer panel