]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/bot/default/bot.qc
Purge server/constants.qh
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / bot / default / bot.qc
index 7b30b62dfabbd720111f6cafad9296c231ce7a66..c42a053f45c8a421a8a0fff54fa1ade1023e172d 100644 (file)
 #include "../../autocvars.qh"
 #include "../../campaign.qh"
 #include "../../client.qh"
-#include "../../constants.qh"
-#include "../../defs.qh"
+#include <common/stats.qh>
+#include <server/world.qh>
+#include <server/damage.qh>
 #include "../../race.qh"
-#include <common/t_items.qh>
+#include <server/items/items.qh>
 
 #include <server/mutators/_mod.qh>
 
@@ -350,14 +351,14 @@ void bot_custom_weapon_priority_setup()
                        tokens = tokenizebyseparator(W_NumberWeaponOrder(autocvar_bot_ai_custom_weapon_priority_##dist)," "); \
                        bot_weapons_##dist[0] = -1; \
                        c = 0; \
-                       for(i = 0; i < tokens && c < Weapons_COUNT; ++i) { \
+                       for(i = 0; i < tokens && c < REGISTRY_COUNT(Weapons); ++i) { \
                                w = stof(argv(i)); \
                                if (w >= WEP_FIRST && w <= WEP_LAST) { \
                                        bot_weapons_##dist[c] = w; \
                                        ++c; \
                                } \
                        } \
-                       if (c < Weapons_COUNT) \
+                       if (c < REGISTRY_COUNT(Weapons)) \
                                bot_weapons_##dist[c] = -1; \
                } \
        MACRO_END