]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Express cost of normal waypoint links in time needed to cross them at constant walk...
authorterencehill <piuntn@gmail.com>
Tue, 18 Apr 2017 13:22:09 +0000 (15:22 +0200)
committerterencehill <piuntn@gmail.com>
Tue, 18 Apr 2017 13:22:09 +0000 (15:22 +0200)
qcsrc/server/bot/default/waypoints.qc

index 9269ff17c7614ec3b21d14de985843d553b7e62b..599a8ad9906e528391ceb32f39cdc626dbc2bed8 100644 (file)
@@ -399,7 +399,7 @@ void waypoint_addlink(entity from, entity to)
                v2_y = bound(m1_y, v2_y, m2_y);
                v2_z = bound(m1_z, v2_z, m2_z);
        }
-       c = vlen(v2 - v1);
+       c = vlen(v2 - v1) / autocvar_sv_maxspeed;
 
        if (from.wp31mincost < c) return;
        if (from.wp30mincost < c) {from.wp31 = to;from.wp31mincost = c;return;} from.wp31 = from.wp30;from.wp31mincost = from.wp30mincost;