X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fserver%2Fbot%2Fbot.qc;h=b93d87ad29f229736686045c546f26d0af1101a6;hp=b2e20e776435478bf7454d3eadef79ce5e989e5f;hb=04ab0ff7c3c5fcfe9780eadccfd5abd03d25b181;hpb=2316f8469c5be7383b5537e9425442e6678e0bf1 diff --git a/qcsrc/server/bot/bot.qc b/qcsrc/server/bot/bot.qc index b2e20e7764..b93d87ad29 100644 --- a/qcsrc/server/bot/bot.qc +++ b/qcsrc/server/bot/bot.qc @@ -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; @@ -148,7 +148,7 @@ void bot_setnameandstuff() prio = 1; FOR_EACH_CLIENT(p) { - if(clienttype(p) == CLIENTTYPE_BOT) + if(IS_BOT_CLIENT(p)) if(s == p.cleanname) { prio = 0; @@ -218,7 +218,7 @@ void bot_setnameandstuff() i = 0; FOR_EACH_CLIENT(p) { - if(clienttype(p) == CLIENTTYPE_BOT) + if(IS_BOT_CLIENT(p)) if(p.cleanname == name) ++i; } @@ -342,7 +342,7 @@ void bot_relinkplayerlist() { player_count = player_count + 1; e.nextplayer = e.chain; - if (clienttype(e) == CLIENTTYPE_BOT) + if (IS_BOT_CLIENT(e)) { if (prevbot) prevbot.nextbot = e; @@ -363,7 +363,7 @@ void bot_relinkplayerlist() void bot_clientdisconnect() { - if (clienttype(self) != CLIENTTYPE_BOT) + if (!IS_BOT_CLIENT(self)) return; bot_clearqueue(self); if(self.cleanname) @@ -386,7 +386,7 @@ void bot_clientdisconnect() void bot_clientconnect() { - if (clienttype(self) != CLIENTTYPE_BOT) + 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 = FL_TEAM_1; + self.team = NUM_TEAM_1; else if(self.bot_forced_team==2) - self.team = FL_TEAM_2; + self.team = NUM_TEAM_2; else if(self.bot_forced_team==3) - self.team = FL_TEAM_3; + self.team = NUM_TEAM_3; else if(self.bot_forced_team==4) - self.team = FL_TEAM_4; + self.team = NUM_TEAM_4; else JoinBestTeam(self, FALSE, TRUE); @@ -425,13 +425,13 @@ void bot_removefromlargestteam() bestcount = 0; while (head) { - if(head.team == FL_TEAM_1) + if(head.team == NUM_TEAM_1) thiscount = c1; - else if(head.team == FL_TEAM_2) + else if(head.team == NUM_TEAM_2) thiscount = c2; - else if(head.team == FL_TEAM_3) + else if(head.team == NUM_TEAM_3) thiscount = c3; - else if(head.team == FL_TEAM_4) + else if(head.team == NUM_TEAM_4) thiscount = c4; else thiscount = 0; @@ -491,7 +491,7 @@ void autoskill(float factor) bestplayer = -1; FOR_EACH_PLAYER(head) { - if(clienttype(head) == CLIENTTYPE_REAL) + if(IS_REAL_CLIENT(head)) bestplayer = max(bestplayer, head.totalfrags - head.totalfrags_lastcheck); else bestbot = max(bestbot, head.totalfrags - head.totalfrags_lastcheck); @@ -551,7 +551,7 @@ float bot_fixcount() FOR_EACH_REALCLIENT(head) { - if(head.classname == "player" || g_lms || g_arena || g_ca) + if(IS_PLAYER(head) || g_lms || head.caplayer == 1) ++activerealplayers; ++realplayers; }