From: Rudolf Polzer Date: Sun, 7 Aug 2011 19:27:39 +0000 (+0200) Subject: use wayboxes for teleports again X-Git-Tag: xonotic-v0.5.0~148^2~16 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=f7ceed01faf1670356ca311ea319925000f69543;p=xonotic%2Fxonotic-data.pk3dir.git use wayboxes for teleports again --- diff --git a/qcsrc/server/bot/waypoints.qc b/qcsrc/server/bot/waypoints.qc index 29a6b86ad..d2db7cd23 100644 --- a/qcsrc/server/bot/waypoints.qc +++ b/qcsrc/server/bot/waypoints.qc @@ -772,14 +772,12 @@ void waypoint_spawnforitem(entity e) waypoint_spawnforitem_force(e, e.origin); }; -void waypoint_spawnforteleporter_v(entity e, vector org, vector destination, float timetaken) +void waypoint_spawnforteleporter_boxes(entity e, vector org1, vector org2, vector destination1, vector destination2, float timetaken) { local entity w; local entity dw; - org = waypoint_fixorigin(org); - destination = waypoint_fixorigin(destination); - w = waypoint_spawn(org, org, WAYPOINTFLAG_GENERATED | WAYPOINTFLAG_TELEPORT | WAYPOINTFLAG_NORELINK); - dw = waypoint_spawn(destination, destination, WAYPOINTFLAG_GENERATED); + w = waypoint_spawn(org1, org2, WAYPOINTFLAG_GENERATED | WAYPOINTFLAG_TELEPORT | WAYPOINTFLAG_NORELINK); + dw = waypoint_spawn(destination1, destination2, WAYPOINTFLAG_GENERATED); // one way link to the destination w.wp00 = dw; w.wp00mincost = timetaken; // this is just for jump pads @@ -789,9 +787,17 @@ void waypoint_spawnforteleporter_v(entity e, vector org, vector destination, flo e.nearestwaypointtimeout = time + 1000000000; }; +void waypoint_spawnforteleporter_v(entity e, vector org, vector destination, float timetaken) +{ + org = waypoint_fixorigin(org); + destination = waypoint_fixorigin(destination); + waypoint_spawnforteleporter_boxes(e, org, org, destination, destination, timetaken); +}; + void waypoint_spawnforteleporter(entity e, vector destination, float timetaken) { - waypoint_spawnforteleporter_v(e, (e.absmin + e.absmax) * 0.5, destination, timetaken); + destination = waypoint_fixorigin(destination); + waypoint_spawnforteleporter_boxes(e, e.absmin, e.absmax, destination, destination, timetaken); }; entity waypoint_spawnpersonal(vector position)