[nexuiz-commits] r6414 - trunk/data/qcsrc/server
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Thu Apr 2 14:51:02 EDT 2009
Author: mand1nga
Date: 2009-04-02 14:51:01 -0400 (Thu, 02 Apr 2009)
New Revision: 6414
Modified:
trunk/data/qcsrc/server/bots.qc
Log:
Increased in 250 qu the radius used for searching nearest waypoints. Now bots don't get stuck near the electro on runningman anymore.
Modified: trunk/data/qcsrc/server/bots.qc
===================================================================
--- trunk/data/qcsrc/server/bots.qc 2009-04-02 11:05:01 UTC (rev 6413)
+++ trunk/data/qcsrc/server/bots.qc 2009-04-02 18:51:01 UTC (rev 6414)
@@ -1269,13 +1269,19 @@
w = w.chain;
}
- // try a short range search for the nearest waypoints, and expand thesearch repeatedly if none are found
+ // try a short range search for the nearest waypoints, and expand the search repeatedly if none are found
+ // as this search is expensive we will use lower values if the bot is on the air
local float i, increment, maxdistance;
- increment = 500;
if(self.flags & FL_ONGROUND)
+ {
+ increment = 750;
maxdistance = 50000;
+ }
else
+ {
+ increment = 500;
maxdistance = 1500;
+ }
for(i=increment;!navigation_markroutes_nearestwaypoints(waylist, i)&&i<maxdistance;i+=increment);
More information about the nexuiz-commits
mailing list