]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/bot/bot.qc
Don't execute bot code when bots are forced observer. In CA it allowed bots added...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / bot / bot.qc
index 36fa2bf088897743afb8bcb82c3b7fb65ba49ec0..40b769ddd3fb4a78f3b156995a2cf53153800869 100644 (file)
@@ -43,7 +43,7 @@ void bot_think()
        //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;
@@ -363,7 +363,7 @@ void bot_relinkplayerlist()
 
 void bot_clientdisconnect()
 {
-       if not(IS_BOT_CLIENT(self))
+       if (!IS_BOT_CLIENT(self))
                return;
        bot_clearqueue(self);
        if(self.cleanname)
@@ -386,7 +386,7 @@ void bot_clientdisconnect()
 
 void bot_clientconnect()
 {
-       if not(IS_BOT_CLIENT(self))
+       if (!IS_BOT_CLIENT(self))
                return;
        self.bot_preferredcolors = self.clientcolors;
        self.bot_nextthink = time - random();