From: terencehill Date: Wed, 3 May 2017 19:39:39 +0000 (+0200) Subject: Fix link cost calculation formula X-Git-Tag: xonotic-v0.8.5~2378^2~167 X-Git-Url: https://de.git.xonotic.org/?a=commitdiff_plain;h=affedf4061544095fbea520d123743ad680c558a;p=xonotic%2Fxonotic-data.pk3dir.git Fix link cost calculation formula --- diff --git a/qcsrc/server/bot/default/waypoints.qc b/qcsrc/server/bot/default/waypoints.qc index d12da82b7..e545c6c85 100644 --- a/qcsrc/server/bot/default/waypoints.qc +++ b/qcsrc/server/bot/default/waypoints.qc @@ -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)