From: MirceaKitsune Date: Sun, 26 Sep 2010 11:05:04 +0000 (+0300) Subject: Fix a badly written code in the bot vore AI. This should technically make bots a... X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=4e711c50b08c9306d2cbb0278a869c2789cb22f4;p=voretournament%2Fvoretournament.git Fix a badly written code in the bot vore AI. This should technically make bots a little bit stronger. --- 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;