From 01e00e0504738163fa539565e3356aad7e4a9926 Mon Sep 17 00:00:00 2001
From: MirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Date: Sat, 9 Jul 2011 20:06:16 +0300
Subject: [PATCH] Teach bots to fear / be courageous toward prey based on
 player size difference and stomach load

---
 data/botsVT.cfg                           | 6 +++---
 data/qcsrc/server/bot/havocbot/vore_ai.qc | 3 +++
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/data/botsVT.cfg b/data/botsVT.cfg
index 83f3cdb5..aa4fa302 100644
--- a/data/botsVT.cfg
+++ b/data/botsVT.cfg
@@ -45,9 +45,9 @@ set bot_ai_bunnyhop_skilloffset 7	"Bots with skill equal or greater than this va
 set bot_ai_bunnyhop_startdistance 250 "Run to goals located further than this distance"
 set bot_ai_bunnyhop_stopdistance 220 "Stop jumping after reaching this distance to the goal"
 set bot_ai_bunnyhop_firstjumpdelay 0.5 "Start running to the goal only if it was seen for more than N seconds"
-set bot_ai_vore_decide_pred 1.2 "How fast bots decide what to do with their prey, at lowest skill"
-set bot_ai_vore_decide_prey 1.2 "How fast bots decide what to do with their predator, at lowest skill"
-set bot_ai_vore_decide_swallow 0.2 "How often bots decide if to swallow someone"
+set bot_ai_vore_decide_pred 0.9 "How fast bots decide what to do with their prey, at lowest skill"
+set bot_ai_vore_decide_prey 1.1 "How fast bots decide what to do with their predator, at lowest skill"
+set bot_ai_vore_decide_swallow 0.3 "How often bots decide if to swallow someone"
 set bot_ai_vore_fear 2 "How much bots will fear players more powerful than them and avoid them in some situations"
 set bot_ai_vore_teamhealabandon 0.75 "Probability (from 0 to 1) of the bot abandoning a team heal when seeing an enemy they can vore, at highest skill"
 set bot_ai_vore_stayinstomach 0 "When enabled, a bot will stay in a team mate's stomach even if he has no reason to and could willingly leave"
diff --git a/data/qcsrc/server/bot/havocbot/vore_ai.qc b/data/qcsrc/server/bot/havocbot/vore_ai.qc
index b8e7d308..83d8169c 100644
--- a/data/qcsrc/server/bot/havocbot/vore_ai.qc
+++ b/data/qcsrc/server/bot/havocbot/vore_ai.qc
@@ -136,6 +136,9 @@ void Vore_AI()
 		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;
 
+		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(Swallow_condition_check_bot(prey))
 		{
 			if(time > self.decide_swallow)
-- 
2.39.5