From 2172c9941a15b3f6c1acc6ecc32ffe615c8aa275 Mon Sep 17 00:00:00 2001 From: MirceaKitsune Date: Sun, 18 Mar 2012 15:53:55 +0200 Subject: [PATCH] Fix a bug with the bot AI causing bots to get stuck in team games when eating consumable items --- data/qcsrc/server/bot/havocbot/vore_ai.qc | 8 ++++++++ 1 file changed, 8 insertions(+) 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 -- 2.39.2