]> de.git.xonotic.org Git - voretournament/voretournament.git/blobdiff - data/qcsrc/server/bot/havocbot/vore_ai.qc
Fix a bug with the bot AI causing bots to get stuck in team games when eating consuma...
[voretournament/voretournament.git] / 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