From: terencehill Date: Fri, 23 Aug 2024 22:11:24 +0000 (+0200) Subject: Shownames: restore an early alpha check that was made exclusive to CTS by mistake... X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=1b8cc9bf29a6c3ef7c64910a4f15a665b749de8b;p=xonotic%2Fxonotic-data.pk3dir.git Shownames: restore an early alpha check that was made exclusive to CTS by mistake in 0aa7cb88f --- diff --git a/qcsrc/client/shownames.qc b/qcsrc/client/shownames.qc index 3f0688d61..45496e879 100644 --- a/qcsrc/client/shownames.qc +++ b/qcsrc/client/shownames.qc @@ -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) { diff --git a/qcsrc/common/gamemodes/gamemode/cts/cl_cts.qc b/qcsrc/common/gamemodes/gamemode/cts/cl_cts.qc index ce095bf20..1af406f31 100644 --- a/qcsrc/common/gamemodes/gamemode/cts/cl_cts.qc +++ b/qcsrc/common/gamemodes/gamemode/cts/cl_cts.qc @@ -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