]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Use modern methods to access registry item counts
authorMario <mario.mario@y7mail.com>
Mon, 19 Oct 2020 00:01:03 +0000 (10:01 +1000)
committerMario <mario.mario@y7mail.com>
Mon, 19 Oct 2020 00:01:03 +0000 (10:01 +1000)
qcsrc/client/hud/panel/scoreboard.qc

index c474ad33b8c0b2cb4f8dc574e479bab745bac3e1..c7adc69d49fc3d313c85515863fadddbd029b92d 100644 (file)
@@ -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;