From: MirceaKitsune Date: Thu, 7 Jul 2011 23:14:24 +0000 (+0300) Subject: Fix a bug causing the bot AI to get stuck at high skill levels after voring. X-Git-Url: https://git.xonotic.org/?a=commitdiff_plain;h=b31f71fd3939aa8ff735b3d43b018a0272ac5ce7;p=voretournament%2Fvoretournament.git Fix a bug causing the bot AI to get stuck at high skill levels after voring. --- diff --git a/data/qcsrc/server/bot/havocbot/havocbot.qc b/data/qcsrc/server/bot/havocbot/havocbot.qc index 95c4e95d..570fe7eb 100644 --- a/data/qcsrc/server/bot/havocbot/havocbot.qc +++ b/data/qcsrc/server/bot/havocbot/havocbot.qc @@ -16,8 +16,6 @@ void havocbot_ai() // execute the vore AI for bots Vore_AI(); - if(self.stat_eaten) - return; // an eaten bot has nothing to do outside of the vore AI if (bot_strategytoken == self) if (!bot_strategytoken_taken) @@ -83,6 +81,8 @@ void havocbot_ai() if(self.deadflag != DEAD_NO) return; + if(self.stat_eaten) + return; // a prey bot has nothing to do from here on havocbot_chooseenemy(); if (self.bot_chooseweapontime < time ) diff --git a/data/qcsrc/server/bot/havocbot/vore_ai.qc b/data/qcsrc/server/bot/havocbot/vore_ai.qc index 1d4b08a8..30610755 100644 --- a/data/qcsrc/server/bot/havocbot/vore_ai.qc +++ b/data/qcsrc/server/bot/havocbot/vore_ai.qc @@ -87,7 +87,7 @@ void Vore_AI() if(!cvar("g_vore")) // the vore system is disabled return; - if(cvar("bot_nofire") || !skill || (g_rpg && cvar("g_rpg_botattack") < 1)) + if(self.deadflag != DEAD_NO || cvar("bot_nofire") || !skill || (g_rpg && cvar("g_rpg_botattack") < 1)) return; float randomtry;