From: MirceaKitsune Date: Sun, 18 Mar 2012 13:53:55 +0000 (+0200) Subject: Fix a bug with the bot AI causing bots to get stuck in team games when eating consuma... X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=2172c9941a15b3f6c1acc6ecc32ffe615c8aa275;p=voretournament%2Fvoretournament.git Fix a bug with the bot AI causing bots to get stuck in team games when eating consumable items --- diff --git a/data/qcsrc/server/bot/havocbot/vore_ai.qc b/data/qcsrc/server/bot/havocbot/vore_ai.qc index e5051955..d54e6fe8 100644 --- a/data/qcsrc/server/bot/havocbot/vore_ai.qc +++ b/data/qcsrc/server/bot/havocbot/vore_ai.qc @@ -60,6 +60,14 @@ void Vore_AI_Teamheal(entity prey) return; } } + for(head = world; (head = find(head, classname, "consumable")); ) + { + if(head.predator == self) + { + self.status_teamhealing = 0; // we have consumable items, don't teamheal + return; + } + } } else self.status_teamhealing = 1; // if our stomach is empty, it means we can decide to teamheal