]> git.rm.cloudns.org Git - voretournament/voretournament.git/commitdiff
Team healing AI now working as intended, but not ready yet. Also fix another tiny...
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Tue, 7 Sep 2010 15:54:30 +0000 (18:54 +0300)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Tue, 7 Sep 2010 15:54:30 +0000 (18:54 +0300)
data/qcsrc/server/bot/havocbot/vore_ai.qc
data/qcsrc/server/vore.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;
index 0c45de6a96991c8dca127a3e9dc117b45aa10ed0..63139a5b7b2f22c17c9aa9cc3c41513372445905 100644 (file)
@@ -125,7 +125,7 @@ void Vore_Swallow(entity e)
                e.colormod = stov(cvar_string("g_vore_regurgitatecolor_released"));\r
 \r
        if(e.eater.team == e.team && teamplay)\r
-               centerprint(e.eater, "^4You have swallowed a team mate, use caution!");\r
+               centerprint(e.eater, "^3You have swallowed a team mate, use caution!");\r
 \r
        PlayerSound(e.eater, playersound_swallow, CHAN_PAIN, VOICETYPE_PLAYERSOUND);\r
        setanim(e.eater, e.eater.anim_pain1, FALSE, TRUE, TRUE); // looks good for swallowing / regurgitating\r