From: Mario Date: Mon, 19 Oct 2020 00:01:03 +0000 (+1000) Subject: Use modern methods to access registry item counts X-Git-Tag: xonotic-v0.8.5~588^2~20 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=a1bbfc60902b8db83dc7339a0cabc62c1c2e74ac;p=xonotic%2Fxonotic-data.pk3dir.git Use modern methods to access registry item counts --- 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;