From affedf4061544095fbea520d123743ad680c558a Mon Sep 17 00:00:00 2001 From: terencehill Date: Wed, 3 May 2017 21:39:39 +0200 Subject: [PATCH] Fix link cost calculation formula --- qcsrc/server/bot/default/waypoints.qc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) -- 2.39.2