]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/bot/bot.qc
Merge branch 'master' into Mario/overkill
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / bot / bot.qc
index ee4933cc464ef8f2ddcaf4fbd62c291a92999584..b93d87ad29f229736686045c546f26d0af1101a6 100644 (file)
@@ -32,7 +32,7 @@ void bot_think()
        if (self.bot_nextthink > time)
                return;
 
-       self.flags &~= FL_GODMODE;
+       self.flags &= ~FL_GODMODE;
        if(autocvar_bot_god)
                self.flags |= FL_GODMODE;
 
@@ -363,7 +363,7 @@ void bot_relinkplayerlist()
 
 void bot_clientdisconnect()
 {
-       if not(IS_BOT_CLIENT(self))
+       if (!IS_BOT_CLIENT(self))
                return;
        bot_clearqueue(self);
        if(self.cleanname)
@@ -386,7 +386,7 @@ void bot_clientdisconnect()
 
 void bot_clientconnect()
 {
-       if not(IS_BOT_CLIENT(self))
+       if (!IS_BOT_CLIENT(self))
                return;
        self.bot_preferredcolors = self.clientcolors;
        self.bot_nextthink = time - random();
@@ -398,13 +398,13 @@ void bot_clientconnect()
                bot_setnameandstuff();
 
        if(self.bot_forced_team==1)
-               self.team = COLOR_TEAM1;
+               self.team = NUM_TEAM_1;
        else if(self.bot_forced_team==2)
-               self.team = COLOR_TEAM2;
+               self.team = NUM_TEAM_2;
        else if(self.bot_forced_team==3)
-               self.team = COLOR_TEAM3;
+               self.team = NUM_TEAM_3;
        else if(self.bot_forced_team==4)
-               self.team = COLOR_TEAM4;
+               self.team = NUM_TEAM_4;
        else
                JoinBestTeam(self, FALSE, TRUE);
 
@@ -425,13 +425,13 @@ void bot_removefromlargestteam()
        bestcount = 0;
        while (head)
        {
-               if(head.team == COLOR_TEAM1)
+               if(head.team == NUM_TEAM_1)
                        thiscount = c1;
-               else if(head.team == COLOR_TEAM2)
+               else if(head.team == NUM_TEAM_2)
                        thiscount = c2;
-               else if(head.team == COLOR_TEAM3)
+               else if(head.team == NUM_TEAM_3)
                        thiscount = c3;
-               else if(head.team == COLOR_TEAM4)
+               else if(head.team == NUM_TEAM_4)
                        thiscount = c4;
                else
                        thiscount = 0;
@@ -551,7 +551,7 @@ float bot_fixcount()
 
        FOR_EACH_REALCLIENT(head)
        {
-               if(IS_PLAYER(head) || g_lms || g_arena || g_ca)
+               if(IS_PLAYER(head) || g_lms || head.caplayer == 1)
                        ++activerealplayers;
                ++realplayers;
        }