]> git.rm.cloudns.org Git - voretournament/voretournament.git/commitdiff
Fix a bug with the bot AI causing bots to get stuck in team games when eating consuma...
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Sun, 18 Mar 2012 13:53:55 +0000 (15:53 +0200)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Sun, 18 Mar 2012 13:53:55 +0000 (15:53 +0200)
data/qcsrc/server/bot/havocbot/vore_ai.qc

index e5051955a455bba4cd7da7acc8e0be0dcb879ea5..d54e6fe89082471ba98d3b24b286084170a48072 100644 (file)
@@ -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