From c2d649b009208a1d1dfa822d425b9f53ea2bb1ad Mon Sep 17 00:00:00 2001 From: MirceaKitsune Date: Tue, 7 Sep 2010 18:54:30 +0300 Subject: [PATCH] Team healing AI now working as intended, but not ready yet. Also fix another tiny issue --- data/qcsrc/server/bot/havocbot/vore_ai.qc | 9 +++++---- data/qcsrc/server/vore.qc | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/data/qcsrc/server/bot/havocbot/vore_ai.qc b/data/qcsrc/server/bot/havocbot/vore_ai.qc index f7bceae0..174c4280 100644 --- a/data/qcsrc/server/bot/havocbot/vore_ai.qc +++ b/data/qcsrc/server/bot/havocbot/vore_ai.qc @@ -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; diff --git a/data/qcsrc/server/vore.qc b/data/qcsrc/server/vore.qc index 0c45de6a..63139a5b 100644 --- a/data/qcsrc/server/vore.qc +++ b/data/qcsrc/server/vore.qc @@ -125,7 +125,7 @@ void Vore_Swallow(entity e) e.colormod = stov(cvar_string("g_vore_regurgitatecolor_released")); if(e.eater.team == e.team && teamplay) - centerprint(e.eater, "^4You have swallowed a team mate, use caution!"); + centerprint(e.eater, "^3You have swallowed a team mate, use caution!"); PlayerSound(e.eater, playersound_swallow, CHAN_PAIN, VOICETYPE_PLAYERSOUND); setanim(e.eater, e.eater.anim_pain1, FALSE, TRUE, TRUE); // looks good for swallowing / regurgitating -- 2.39.2