From cc46f2587da62945d6b2632d06fc3f9ebb18dd67 Mon Sep 17 00:00:00 2001 From: terencehill Date: Sun, 21 May 2017 10:09:32 +0200 Subject: [PATCH] Fix cost of climbing ladders --- qcsrc/common/triggers/func/ladder.qc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qcsrc/common/triggers/func/ladder.qc b/qcsrc/common/triggers/func/ladder.qc index 9d6b38338..b5f0accfb 100644 --- a/qcsrc/common/triggers/func/ladder.qc +++ b/qcsrc/common/triggers/func/ladder.qc @@ -47,8 +47,8 @@ void func_ladder_init(entity this) func_ladder_link(this); vector top = (this.absmin + this.absmax) / 2; top.z = this.absmax.z + 1 - PL_MIN_CONST.z; - float height = this.absmax.z - this.absmin.z; - waypoint_spawnforteleporter_boxes(this, WAYPOINTFLAG_LADDER, this.absmin, this.absmax, top, top, height); + float cost = waypoint_getdistancecost_simple(this.absmax.z - this.absmin.z); + waypoint_spawnforteleporter_boxes(this, WAYPOINTFLAG_LADDER, this.absmin, this.absmax, top, top, cost); } spawnfunc(func_ladder) -- 2.39.2