From 4e711c50b08c9306d2cbb0278a869c2789cb22f4 Mon Sep 17 00:00:00 2001 From: MirceaKitsune Date: Sun, 26 Sep 2010 14:05:04 +0300 Subject: [PATCH] Fix a badly written code in the bot vore AI. This should technically make bots a little bit stronger. --- data/qcsrc/server/bot/havocbot/vore_ai.qc | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/data/qcsrc/server/bot/havocbot/vore_ai.qc b/data/qcsrc/server/bot/havocbot/vore_ai.qc index 7301fb97..f037bfb1 100644 --- a/data/qcsrc/server/bot/havocbot/vore_ai.qc +++ b/data/qcsrc/server/bot/havocbot/vore_ai.qc @@ -90,10 +90,14 @@ void Vore_AI() // aim toward the nearest possible victim. The greater the skill, the quicker the aim // this only does the aiming, checking and swallowing is handled below - entity scan; - scan = findradius(self.origin, cvar("g_balance_vore_swallow_range")); - if(Swallow_condition_check_bot(scan)) - bot_aimdir(scan.origin + scan.view_ofs - self.origin - self.view_ofs, -1); + entity head; + head = findradius(self.origin, cvar("g_balance_vore_swallow_range")); + while(head) + { + if(Swallow_condition_check_bot(head)) + bot_aimdir(head.origin + head.view_ofs - self.origin - self.view_ofs, -1); + head = head.chain; + } // now do the actual checking and swallowing entity prey; -- 2.39.2