]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix link cost calculation formula
authorterencehill <piuntn@gmail.com>
Wed, 3 May 2017 19:39:39 +0000 (21:39 +0200)
committerterencehill <piuntn@gmail.com>
Wed, 3 May 2017 19:39:39 +0000 (21:39 +0200)
qcsrc/server/bot/default/waypoints.qc

index d12da82b7531836eb26e21e4b32e0305334517e1..e545c6c85f8a450855ead5f5675aba6066390237 100644 (file)
@@ -403,7 +403,7 @@ float waypoint_getdistancecost(vector from, vector to)
        float height = from.z - to.z;
        if(height > 0 && autocvar_sv_gravity > 0)
        {
-               float height_cost = sqrt(height / autocvar_sv_gravity);
+               float height_cost = sqrt(height / (autocvar_sv_gravity / 2));
                float xydist = vlen(vec2(to - from));
                float xydist_cost = xydist / autocvar_sv_maxspeed;
                if(max(height_cost, xydist_cost) < c)