From 1b8cc9bf29a6c3ef7c64910a4f15a665b749de8b Mon Sep 17 00:00:00 2001 From: terencehill Date: Sat, 24 Aug 2024 00:11:24 +0200 Subject: [PATCH] Shownames: restore an early alpha check that was made exclusive to CTS by mistake in 0aa7cb88f --- qcsrc/client/shownames.qc | 3 +++ qcsrc/common/gamemodes/gamemode/cts/cl_cts.qc | 5 ----- 2 files changed, 3 insertions(+), 5 deletions(-) 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 -- 2.39.2