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(p) == CLIENTTYPE_BOT)
+ if(IS_BOT_CLIENT(p))
if(s == p.cleanname)
{
prio = 0;
i = 0;
FOR_EACH_CLIENT(p)
{
- if(clienttype(p) == CLIENTTYPE_BOT)
+ if(IS_BOT_CLIENT(p))
if(p.cleanname == name)
++i;
}
{
player_count = player_count + 1;
e.nextplayer = e.chain;
- if (clienttype(e) == CLIENTTYPE_BOT)
+ if (IS_BOT_CLIENT(e))
{
if (prevbot)
prevbot.nextbot = e;
void bot_clientdisconnect()
{
- if (clienttype(self) != CLIENTTYPE_BOT)
+ if not(IS_BOT_CLIENT(self))
return;
bot_clearqueue(self);
if(self.cleanname)
void bot_clientconnect()
{
- if (clienttype(self) != CLIENTTYPE_BOT)
+ if not(IS_BOT_CLIENT(self))
return;
self.bot_preferredcolors = self.clientcolors;
self.bot_nextthink = time - random();
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);
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;
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);
FOR_EACH_REALCLIENT(head)
{
- if(head.classname == "player" || g_lms || g_arena || g_ca)
+ if(IS_PLAYER(head) || g_lms || g_arena || head.caplayer == 1)
++activerealplayers;
++realplayers;
}