From a1bbfc60902b8db83dc7339a0cabc62c1c2e74ac Mon Sep 17 00:00:00 2001 From: Mario Date: Mon, 19 Oct 2020 10:01:03 +1000 Subject: [PATCH] Use modern methods to access registry item counts --- qcsrc/client/hud/panel/scoreboard.qc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qcsrc/client/hud/panel/scoreboard.qc b/qcsrc/client/hud/panel/scoreboard.qc index c474ad33b..c7adc69d4 100644 --- a/qcsrc/client/hud/panel/scoreboard.qc +++ b/qcsrc/client/hud/panel/scoreboard.qc @@ -1326,10 +1326,10 @@ vector Scoreboard_ItemStats_Draw(vector pos, vector rgb, vector bg_size) if (!q) ++disownedcnt; }); - int n = Items_COUNT - disownedcnt; + int n = REGISTRY_COUNT(Items) - disownedcnt; if (n <= 0) return pos; - int rows = (autocvar_hud_panel_scoreboard_accuracy_doublerows && n >= floor(Items_COUNT / 2)) ? 2 : 1; + int rows = (autocvar_hud_panel_scoreboard_accuracy_doublerows && n >= floor(REGISTRY_COUNT(Items) / 2)) ? 2 : 1; int columnns = ceil(n / rows); float height = 40; -- 2.39.2