-.float status_teamhealing; // 0 = can't team heal, 1 = can team heal, 2 = team healing currently
-
-entity Swallow_distance_check_bot(entity e)
-{
- // check if we can swallow a player instead of firing our weapon
- vector w_shotorg, w_shotdir;
- w_shotorg = self.origin + self.view_ofs;
- w_shotdir = v_forward;
-
- WarpZone_traceline_antilag(e, w_shotorg, w_shotorg + w_shotdir * cvar("g_balance_vore_swallow_range"), FALSE, e, ANTILAG_LATENCY(e));
- if(trace_fraction < 1)
- if(trace_ent.classname == "player")
- return trace_ent;
- return world;
-}
+.float status_teamhealing; // 0 = can't team heal, 1 = can team heal, 2 = team healing right now
float Swallow_condition_check_bot(entity prey)
{
// checks the necessary conditions for a bot to swallow another player
+
if(prey != self && prey.classname == "player" && prey.predator.classname != "player" && prey.deadflag == DEAD_NO && !prey.BUTTON_CHAT) // we can't swallow someone who's already in someone else's stomach
if(self.predator.classname != "player" && self.stomach_load < cvar("g_balance_vore_swallow_limit") && self.deadflag == DEAD_NO) // we can't swallow players while inside someone's stomach ourselves
if not(cvar("g_vore_biggergut") && prey.stomach_load > self.stomach_load)
float random_try;
float decide_prey, decide_pred;
- prey = Swallow_distance_check_bot(self);
+ prey = Swallow_player_check();
// check if we should run the Teamhealing AI rather than continuing with the normal vore
Vore_AI_Teamheal(prey);
const float button_delay_time = 0.5;\r
const float steptime = 0.1;\r
\r
-entity Swallow_distance_check()\r
+entity Swallow_player_check()\r
{\r
// check if we can swallow a player instead of firing our weapon\r
\r
// --------------------------------\r
\r
entity prey;\r
- prey = Swallow_distance_check();\r
+ prey = Swallow_player_check();\r
\r
// attempt to swallow our new prey if we pressed the attack button, and there's any in range\r
if(self.BUTTON_ATCK && !self.BUTTON_REGURGITATE && self.swallow_delay < time)\r