X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=data%2Fqcsrc%2Fserver%2Fbot%2Fhavocbot%2Fvore_ai.qc;h=dbe702b300cc9f8ef45eb8087cd0fc979b16ba5b;hb=86a07d1432100fa0dc18216056382b1dafa52c4b;hp=3e74edff9285891caaa53abd529950576f241067;hpb=f6fb313876957ca2270250111ba2bb5f9f4024a6;p=voretournament%2Fvoretournament.git diff --git a/data/qcsrc/server/bot/havocbot/vore_ai.qc b/data/qcsrc/server/bot/havocbot/vore_ai.qc index 3e74edff..dbe702b3 100644 --- a/data/qcsrc/server/bot/havocbot/vore_ai.qc +++ b/data/qcsrc/server/bot/havocbot/vore_ai.qc @@ -1,22 +1,9 @@ -.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) @@ -110,7 +97,7 @@ void Vore_AI() 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);