[nexuiz-commits] r6170 - trunk/data/qcsrc/server
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Sat Mar 14 21:01:55 EDT 2009
Author: mand1nga
Date: 2009-03-14 21:01:55 -0400 (Sat, 14 Mar 2009)
New Revision: 6170
Modified:
trunk/data/qcsrc/server/havocbot.qc
trunk/data/qcsrc/server/havocbot_roles.qc
Log:
Fixed bug in the routing to alternative goals. Don't rate enemies as goals when they're too close.
Modified: trunk/data/qcsrc/server/havocbot.qc
===================================================================
--- trunk/data/qcsrc/server/havocbot.qc 2009-03-15 00:33:28 UTC (rev 6169)
+++ trunk/data/qcsrc/server/havocbot.qc 2009-03-15 01:01:55 UTC (rev 6170)
@@ -388,14 +388,10 @@
}
// use the alternative goal
- if (bot_strategytoken == self)
- if (!bot_strategytoken_taken)
- {
- navigation_findnearestwaypoint(self.alternativegoal, TRUE);
- navigation_routetogoal(self.alternativegoal);
- self.alternativegoal = world;
- bot_strategytoken_taken = TRUE;
- }
+ navigation_findnearestwaypoint(self.alternativegoal, TRUE);
+ navigation_routetogoal(self.alternativegoal);
+ self.alternativegoal = world;
+ bot_strategytoken_taken = TRUE;
return;
}
Modified: trunk/data/qcsrc/server/havocbot_roles.qc
===================================================================
--- trunk/data/qcsrc/server/havocbot_roles.qc 2009-03-15 00:33:28 UTC (rev 6169)
+++ trunk/data/qcsrc/server/havocbot_roles.qc 2009-03-15 01:01:55 UTC (rev 6170)
@@ -254,7 +254,7 @@
void havocbot_goalrating_enemyplayers(float ratingscale, vector org, float sradius)
{
local entity head;
- local float t, noteam;
+ local float t, noteam, distance;
noteam = ((self.team == 0) || !teams_matter); // fteqcc sucks
// don't chase players if we're under water
@@ -268,7 +268,8 @@
if (head.health > 0)
if ((noteam && (!bot_ignore_bots || clienttype(head) == CLIENTTYPE_REAL)) || head.team != self.team)
{
- if (vlen(head.origin - org) > sradius)
+ distance = vlen(head.origin - org);
+ if (distance < 100 || distance > sradius)
continue;
if(g_minstagib)
More information about the nexuiz-commits
mailing list