X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fbot%2Fbot.qc;h=b2e20e776435478bf7454d3eadef79ce5e989e5f;hb=19ab1a2ba6824a03f8d263d27cc84dc7d54958ac;hp=bdcfe864e4e43666a60901933d549893f513a543;hpb=74cb317eb10d44a2f21bd16c352092da742f880f;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/bot/bot.qc b/qcsrc/server/bot/bot.qc index bdcfe864e..b2e20e776 100644 --- a/qcsrc/server/bot/bot.qc +++ b/qcsrc/server/bot/bot.qc @@ -45,7 +45,7 @@ void bot_think() if (autocvar_g_campaign && !campaign_bots_may_start) { - self.nextthink = time + 0.5; + self.bot_nextthink = time + 0.5; return; } @@ -85,7 +85,7 @@ void bot_think() { // block the bot during the countdown to game start self.movement = '0 0 0'; - self.nextthink = game_starttime; + self.bot_nextthink = game_starttime; return; } @@ -135,16 +135,15 @@ void bot_setnameandstuff() else { RandomSelection_Init(); - for(;;) + while((readfile = fgets(file))) { - readfile = fgets(file); - if(!readfile) - break; if(substring(readfile, 0, 2) == "//") continue; if(substring(readfile, 0, 1) == "#") continue; tokens = tokenizebyseparator(readfile, "\t"); + if(tokens == 0) + continue; s = argv(0); prio = 1; FOR_EACH_CLIENT(p) @@ -393,7 +392,7 @@ void bot_clientconnect() self.bot_nextthink = time - random(); self.lag_func = bot_lagfunc; self.isbot = TRUE; - self.createdtime = self.nextthink; + self.createdtime = self.bot_nextthink; if(!self.bot_config_loaded) // This is needed so team overrider doesn't break between matches bot_setnameandstuff();