if (autocvar_g_campaign && !campaign_bots_may_start)
{
- self.nextthink = time + 0.5;
+ self.bot_nextthink = time + 0.5;
return;
}
{
// block the bot during the countdown to game start
self.movement = '0 0 0';
- self.nextthink = game_starttime;
+ self.bot_nextthink = game_starttime;
return;
}
file = fopen(autocvar_bot_config_file, FILE_READ);
if(file < 0)
+ {
print(strcat("Error: Can not open the bot configuration file '",autocvar_bot_config_file,"'\n"));
+ readfile = "";
+ }
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)
{
if (clienttype(self) != CLIENTTYPE_BOT)
return;
+ bot_clearqueue(self);
if(self.cleanname)
strunzone(self.cleanname);
if(self.netname_freeme)
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();
localcmd("quit\n");
}
- if (currentbots > 0 || autocvar_g_waypointeditor)
+ if (currentbots > 0 || autocvar_g_waypointeditor || autocvar_g_waypointeditor_auto)
if (botframe_spawnedwaypoints)
{
if(botframe_cachedwaypointlinks)
if (autocvar_g_waypointeditor)
botframe_showwaypointlinks();
+ if (autocvar_g_waypointeditor_auto)
+ botframe_autowaypoints();
+
if(time > bot_cvar_nextthink)
{
if(currentbots>0)