]> de.git.xonotic.org Git - voretournament/voretournament.git/blobdiff - data/qcsrc/server/bot/havocbot/vore_ai.qc
Team healing AI now working as intended, but not ready yet. Also fix another tiny...
[voretournament/voretournament.git] / data / qcsrc / server / bot / havocbot / vore_ai.qc
index f7bceae0356d66f03a2de01154792d499864e5f9..174c428029c7947cb64907608c89f02b93ce2bba 100644 (file)
@@ -33,8 +33,11 @@ void Vore_AI_Teamheal(entity prey)
                return;
 
        self.status_teamhealing = 1; // start from the premise we can teamheal until proven otherwise
-       if(self.deadflag != DEAD_NO || self.eater.classname == "player")
+       if(self.deadflag != DEAD_NO || self.eater.classname == "player" || self.flagcarried)
+       {
                self.status_teamhealing = 0;
+               return;
+       }
 
        // if we are holding a team mate that's been healed to the max, we can release them
        // also use this check to not go any further if someone from the enemy team is in our stomach
@@ -47,6 +50,7 @@ void Vore_AI_Teamheal(entity prey)
                        {
                                if(head.team == self.team)
                                {
+                                       self.status_teamhealing = 2;
                                        if(head.health >= cvar("g_balance_vore_teamheal_stable"))
                                                self.BUTTON_REGURGITATE = TRUE; // release the team mate
                                }
@@ -65,10 +69,7 @@ void Vore_AI_Teamheal(entity prey)
        if not(prey.flagcarried) // don't eat the flag carrier and ruin his job
        if(Swallow_condition_check_bot(prey))
        if(prey.health < cvar("g_balance_vore_teamheal_stable"))
-       {
                self.BUTTON_ATCK = TRUE; // swallow
-               self.status_teamhealing = 2;
-       }
 }
 
 .float swallow_retry, decide_delay1, decide_delay2;