Fix a badly written code in the bot vore AI. This should technically make bots a...
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Sun, 26 Sep 2010 11:05:04 +0000 (14:05 +0300)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Sun, 26 Sep 2010 11:05:04 +0000 (14:05 +0300)
data/qcsrc/server/bot/havocbot/vore_ai.qc

index 7301fb97f39cd6315c91e83ca39f12d14d399ac4..f037bfb1b0b00796caf8181d86f09c3c05ffcab4 100644 (file)
@@ -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;