From 5aac90b276f25040da1e8c708761f26b07a57514 Mon Sep 17 00:00:00 2001 From: div0 Date: Sun, 23 Jul 2006 15:05:10 +0000 Subject: [PATCH] bots who try to catch their own tail are... dumb. Fixed. git-svn-id: svn://svn.icculus.org/nexuiz/trunk@1770 f962a42d-fe04-0410-a3ab-8c8b0445ebaa --- data/qcsrc/server/havocbot_roles.qc | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/data/qcsrc/server/havocbot_roles.qc b/data/qcsrc/server/havocbot_roles.qc index 88605da4a..dbd7b76ca 100644 --- a/data/qcsrc/server/havocbot_roles.qc +++ b/data/qcsrc/server/havocbot_roles.qc @@ -68,10 +68,15 @@ void(float ratingscale, vector org, float sradius) havocbot_goalrating_enemyplay local entity head; local float t, noteam; ratingscale = ratingscale * 1200; - noteam = self.team == 0 || teamplay == 0; + noteam = ((self.team == 0) || (teamplay == 0)); // fteqcc sucks + //dprint("teamplay is "); dprint(ftos(teamplay)); dprint(", own team is "); + //dprint(ftos(self.team)); dprint(" -> noteam is "); dprint(ftos(noteam)); + //dprint("\n"); + head = findchain(classname, "player"); while (head) { + if (self != head) if (head.health > 0) if ((noteam && (!bot_ignore_bots || clienttype(head) == CLIENTTYPE_REAL)) || head.team != self.team) if (vlen(head.origin - org) < sradius) @@ -81,7 +86,10 @@ void(float ratingscale, vector org, float sradius) havocbot_goalrating_enemyplay t = 1; t = t / (head.health + head.armortype * head.armorvalue); if (t > 0) + { + //dprint("found: "); dprint(head.netname); dprint("\n"); navigation_routerating(head, t * ratingscale); + } } head = head.chain; } -- 2.39.2