From f4eb38b519ce0da5a1efb00b7ad9e211abf3d2a3 Mon Sep 17 00:00:00 2001 From: terencehill Date: Sat, 1 Apr 2017 17:28:49 +0200 Subject: [PATCH] Freeze Tag bot AI: avoid gathering all teammates in one place; seek teammates out more if low on health (eventually ignoring frozen teammates if really low) --- qcsrc/server/mutators/mutator/gamemode_freezetag.qc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/qcsrc/server/mutators/mutator/gamemode_freezetag.qc b/qcsrc/server/mutators/mutator/gamemode_freezetag.qc index 515c9da94..1d6e1c1ff 100644 --- a/qcsrc/server/mutators/mutator/gamemode_freezetag.qc +++ b/qcsrc/server/mutators/mutator/gamemode_freezetag.qc @@ -225,6 +225,7 @@ void(entity this) havocbot_role_ft_offense; void havocbot_goalrating_freeplayers(entity this, float ratingscale, vector org, float sradius) { + float t; FOREACH_CLIENT(IS_PLAYER(it) && it != this && SAME_TEAM(it, this), LAMBDA( if (STAT(FROZEN, it) == 1) { @@ -232,11 +233,12 @@ void havocbot_goalrating_freeplayers(entity this, float ratingscale, vector org, continue; navigation_routerating(this, it, ratingscale, 2000); } - else + else if(vdist(it.origin - org, >, 400)) // avoid gathering all teammates in one place { // If teamate is not frozen still seek them out as fight better // in a group. - navigation_routerating(this, it, ratingscale/3, 2000); + t = 0.2 * 150 / (this.health + this.armorvalue); + navigation_routerating(this, it, t * ratingscale, 2000); } )); } -- 2.39.2