]> de.git.xonotic.org Git - voretournament/voretournament.git/blobdiff - data/qcsrc/server/bot/havocbot/vore_ai.qc
Use self.stat_eaten instead of checking self.predator.classname. Also adjust the...
[voretournament/voretournament.git] / data / qcsrc / server / bot / havocbot / vore_ai.qc
index 4bbd42112e0b88c94f028bd7ddfc85dde1752db2..1d4b08a80162489daa6bcbece5fe0503ccdd88a5 100644 (file)
@@ -22,7 +22,7 @@ void Vore_AI_Teamheal(entity prey)
 
        if not(teams_matter && cvar("g_balance_vore_teamheal") && cvar("g_vore_teamvore"))
                return;
-       if(self.deadflag != DEAD_NO || self.predator.classname == "player" || self.flagcarried || self.digesting) // a flag carrier can't waste time on team healing
+       if(self.deadflag != DEAD_NO || self.stat_eaten || self.flagcarried || self.digesting) // a flag carrier can't waste time on team healing
        {
                self.status_teamhealing = 0;
                return;
@@ -97,7 +97,7 @@ void Vore_AI()
 // Predator bot behavior:
 // --------------------------------
 
-       if(self.predator.classname != "player")
+       if(!self.stat_eaten)
        {
                // finding and swallowing a player
 
@@ -170,7 +170,7 @@ void Vore_AI()
 // Prey bot behavior:
 // --------------------------------
 
-       if(self.predator.classname == "player" && time > self.decide_prey)
+       if(self.stat_eaten && time > self.decide_prey)
        {
                // all we can do in the stomach is kick and do some damage / try to escape, or leave if the circumstances allow it and we should