]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/client/hud/panel/scoreboard.qc
Use modern methods to access registry item counts
[xonotic/xonotic-data.pk3dir.git] / 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;