]> de.git.xonotic.org Git - voretournament/voretournament.git/commitdiff
When a bot is being swallowed, he will try to swallow the enemy back in defense,...
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Sat, 9 Jul 2011 17:10:00 +0000 (20:10 +0300)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Sat, 9 Jul 2011 17:10:00 +0000 (20:10 +0300)
data/qcsrc/server/bot/havocbot/vore_ai.qc

index 83d8169c57471aa0373372ad877c750383286720..afc9eab5707df423d216c12605c208b3f9ad2a66 100644 (file)
@@ -129,15 +129,18 @@ 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
-               decide_pred_time = cvar("bot_ai_vore_decide_pred") / skill / self.bot_vorethinkpred;
+               if not(self.swallow_progress_prey) // when a bot is being swallowed, he will try to swallow the enemy back in defense, forgetting about fear
+               {
+                       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
+               }
 
-               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
+               decide_pred_time = cvar("bot_ai_vore_decide_pred") / skill / self.bot_vorethinkpred;
 
                if(Swallow_condition_check_bot(prey))
                {