]> git.rm.cloudns.org Git - voretournament/voretournament.git/commitdiff
Bot AI: When reverse scoring is on, it's in the interest of the prey to get eaten...
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Mon, 11 Jul 2011 20:34:24 +0000 (23:34 +0300)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Mon, 11 Jul 2011 20:34:24 +0000 (23:34 +0300)
data/qcsrc/server/bot/havocbot/vore_ai.qc

index 206d8c6e5dfe3d838318dd3e68555fa2a20aea17..d28839af9dcbf896218f1e86c028ef97605773e4 100644 (file)
@@ -130,19 +130,22 @@ 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
-               if(cvar("g_healthsize"))
-                       fear *= (prey.scale / self.scale); // predators fear larger prey and are courageous toward smaller prey
-               if(prey.stomach_load)
-                       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(self.swallow_progress_prey)
-                       fear /= self.swallow_progress_prey * skill;
+               if(!cvar("g_vore_reversescoring")) // when reverse scoring is on, it's in the interest of the prey to get eaten, so the predator has nothing to 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
+                       if(cvar("g_healthsize"))
+                               fear *= (prey.scale / self.scale); // predators fear larger prey and are courageous toward smaller prey
+                       if(prey.stomach_load)
+                               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(self.swallow_progress_prey)
+                               fear /= self.swallow_progress_prey * skill;
+               }
 
                decide_pred_time = cvar("bot_ai_vore_decide_pred") / skill / self.bot_vorethinkpred;