]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/bot/bot.qc
Mutators: combine headers
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / bot / bot.qc
index 3b2af5d92c41141ed4f08cab410c20d6324b6abb..fb76623289bebc239bf8ad9f473a5edae883d65a 100644 (file)
@@ -19,7 +19,7 @@
 #include "../race.qh"
 #include "../t_items.qh"
 
-#include "../mutators/mutators_include.qh"
+#include "../mutators/all.qh"
 
 #include "../weapons/accuracy.qh"
 
@@ -572,13 +572,19 @@ float bot_fixcount()
        activerealplayers = 0;
        realplayers = 0;
 
-       FOR_EACH_REALCLIENT(head)
+       if(!MUTATOR_CALLHOOK(Bot_FixCount, activerealplayers, realplayers))
        {
-               if(IS_PLAYER(head) || g_lms || head.caplayer == 1)
-                       ++activerealplayers;
-               ++realplayers;
+               FOR_EACH_REALCLIENT(head)
+               {
+                       if(IS_PLAYER(head))
+                               ++activerealplayers;
+                       ++realplayers;
+               }
        }
 
+       activerealplayers = bot_activerealplayers;
+       realplayers = bot_realplayers;
+
        // add/remove bots if needed to make sure there are at least
        // minplayers+bot_number, or remove all bots if no one is playing
        // But don't remove bots immediately on level change, as the real players