From e52952ade4067901b17febb66448f4e1845a98e2 Mon Sep 17 00:00:00 2001 From: MirceaKitsune Date: Tue, 5 Oct 2010 04:26:18 +0300 Subject: [PATCH] Fix a major forgotten issue in the vore AI. 0.4 has been delayed, so this is a pre-0.4 change. --- data/qcsrc/server/bot/havocbot/vore_ai.qc | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/data/qcsrc/server/bot/havocbot/vore_ai.qc b/data/qcsrc/server/bot/havocbot/vore_ai.qc index 30a5d196..fed7218b 100644 --- a/data/qcsrc/server/bot/havocbot/vore_ai.qc +++ b/data/qcsrc/server/bot/havocbot/vore_ai.qc @@ -90,6 +90,9 @@ void Vore_AI() if(cvar("bot_nofire") || !skill || (g_rpg && cvar("g_rpg_botattack") < 1)) return; + float randomtry; + randomtry = random() * 10; // there are 10 bot skill steps + // -------------------------------- // Predator bot behavior: // -------------------------------- @@ -111,8 +114,7 @@ void Vore_AI() // now do the actual checking and swallowing entity prey; - float randomtry, fear; - float decide_pred_time, decide_prey_time; + float decide_pred_time, fear; prey = Swallow_player_check(); fear = 1; @@ -122,14 +124,12 @@ void Vore_AI() if(self.status_teamhealing > 1) // if we are teamhealing, there's nothing to do from here on return; - randomtry = random() * 10; // there are 10 bot skill steps if(prey.items & IT_STRENGTH) // avoid eating bots that have the Strenght powerup fear += cvar("bot_ai_vore_fear") * self.bot_vorefear; if(prey.items & IT_INVINCIBLE) // avoid eating bots that have the Invincible powerup fear += cvar("bot_ai_vore_fear") * self.bot_vorefear; fear += self.stomach_load; // the bigger our stomach, the less we want to put someone else in there decide_pred_time = cvar("bot_ai_vore_decide_pred") / skill / self.bot_vorethinkpred; - decide_prey_time = cvar("bot_ai_vore_decide_prey") / skill / self.bot_vorethinkprey; if(time > self.decide_swallow && cvar("g_vore_digestion")) if(Swallow_condition_check_bot(prey)) @@ -173,6 +173,9 @@ void Vore_AI() { // 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 + float decide_prey_time; + decide_prey_time = cvar("bot_ai_vore_decide_prey") / skill / self.bot_vorethinkprey; + if(cvar("g_vore_kick")) if not(g_rpg && cvar("g_rpg_botattack") < 2) if not(teams_matter && self.team == self.predator.team) -- 2.39.2