From: MirceaKitsune Date: Sat, 9 Jul 2011 17:16:24 +0000 (+0300) Subject: Code my last change differently X-Git-Url: http://de.git.xonotic.org/?p=voretournament%2Fvoretournament.git;a=commitdiff_plain;h=afbed62f98a9f0aefb62b0dedeb3121581fc7fce Code my last change differently --- diff --git a/data/qcsrc/server/bot/havocbot/vore_ai.qc b/data/qcsrc/server/bot/havocbot/vore_ai.qc index 8fa47ddd..767e9cb8 100644 --- a/data/qcsrc/server/bot/havocbot/vore_ai.qc +++ b/data/qcsrc/server/bot/havocbot/vore_ai.qc @@ -129,17 +129,17 @@ void Vore_AI() if(self.status_teamhealing > 1) // if we are teamhealing, there's nothing to do from here on return; + 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 + fear *= (prey.scale / self.scale); // predators fear larger prey and are courageous toward smaller prey + fear *= prey.stomach_load; // predators fear prey that have a large stomach + // when a bot is being swallowed, he will try to swallow the enemy back in defense, forgetting about fear - if not(self.swallow_progress_prey * 10 >= 10 - skill) // 10 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 - fear *= (prey.scale / self.scale); // predators fear larger prey and are courageous toward smaller prey - fear *= prey.stomach_load; // predators fear prey that have a large stomach - } + if(self.swallow_progress_prey) + fear /= self.swallow_progress_prey * skill; decide_pred_time = cvar("bot_ai_vore_decide_pred") / skill / self.bot_vorethinkpred;