if (self.bot_nextthink > time)
return;
- self.flags &~= FL_GODMODE;
+ self.flags &= ~FL_GODMODE;
if(autocvar_bot_god)
self.flags |= FL_GODMODE;
//self.bot_painintensity = self.bot_painintensity + self.bot_oldhealth - self.health;
//self.bot_painintensity = bound(0, self.bot_painintensity, 100);
- if (autocvar_g_campaign && !campaign_bots_may_start)
+ if (!IS_PLAYER(self) || (autocvar_g_campaign && !campaign_bots_may_start))
{
self.bot_nextthink = time + 0.5;
return;
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 (!IS_BOT_CLIENT(self))
return;
bot_clearqueue(self);
if(self.cleanname)
void bot_clientconnect()
{
- if (clienttype(self) != CLIENTTYPE_BOT)
+ if (!IS_BOT_CLIENT(self))
return;
self.bot_preferredcolors = self.clientcolors;
self.bot_nextthink = time - random();
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 || head.caplayer == 1)
++activerealplayers;
++realplayers;
}