]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix cost of climbing ladders
authorterencehill <piuntn@gmail.com>
Sun, 21 May 2017 08:09:32 +0000 (10:09 +0200)
committerterencehill <piuntn@gmail.com>
Sun, 21 May 2017 08:09:32 +0000 (10:09 +0200)
qcsrc/common/triggers/func/ladder.qc

index 9d6b38338cc66f563409e974278f3223646c55e4..b5f0accfbaf72e9c6f4af476cdcca09fe15ce8e6 100644 (file)
@@ -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)