set bot_ai_bunnyhop_firstjumpdelay 0.5 "Start running to the goal only if it was seen for more than N seconds"\r
set bot_ai_vore_decide_pred 1.35 "How fast bots decide what to do with their prey, at lowest skill"\r
set bot_ai_vore_decide_prey 1.35 "How fast bots decide what to do with their predator, at lowest skill"\r
-set bot_ai_vore_decide_swallow 0.2 "How often bots decide if to swallow someone or not"\r
+set bot_ai_vore_decide_swallow 0.2 "How often bots decide if to swallow someone"\r
set bot_ai_vore_fear 2 "How much bots will fear players more powerful than them and avoid them in some situations"\r
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"\r
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"\r
return FALSE;
}
+.float decide_swallow, decide_pred, decide_prey;
void Vore_AI_Teamheal(entity prey)
{
// allows bots to use the teamheal feature and heal damaged team mates
if not(prey.digesting) // if our team mate is digesting someone, he likely wouldn't want us ruining his frag
if not(prey.flagcarried) // don't eat the flag carrier and ruin his job
if not(prey.BUTTON_ATCK || prey.BUTTON_ATCK2) // our team mate wouldn't want us eating him while he's firing
- self.BUTTON_ATCK = TRUE; // swallow the team mate
+ if(time > self.decide_swallow)
+ {
+ if(skill >= random() * 10) // there are 10 bot skill steps
+ self.BUTTON_ATCK = TRUE; // swallow the team mate
+ self.decide_swallow = time + cvar("bot_ai_vore_decide_swallow") / self.bot_vorethinkpred; // this is needed to take a proper decision, otherwise the code would execute each frame and return TRUE soon
+ }
}
-.float decide_swallow, decide_pred, decide_prey;
void Vore_AI()
{
// main vore AI code
self.BUTTON_ATCK = TRUE; // swallow
self.decide_pred = time + decide_pred_time; // time before the bot decides what to do with their prey
}
- self.decide_swallow = time + cvar("bot_ai_vore_decide_swallow"); // this is needed to take a proper decision, otherwise the code would execute each frame and return TRUE pretty soon
+ self.decide_swallow = time + cvar("bot_ai_vore_decide_swallow") / self.bot_vorethinkpred; // this is needed to take a proper decision, otherwise the code would execute each frame and return TRUE soon
}
// deciding what to do with a victim: