]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/bot/waypoints.qc
improve bot waypoint auditing
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / bot / waypoints.qc
index b39e59f762343fe4d15e2aa7ed5fc7519e41f82a..3bfb53264f19c241fbc562e21ba9ba6a09cfe463 100644 (file)
@@ -776,7 +776,10 @@ void waypoint_spawnforteleporter(entity e, vector destination, float timetaken)
 {
        local entity w;
        local entity dw;
 {
        local entity w;
        local entity dw;
-       w = waypoint_spawn(e.absmin, e.absmax, WAYPOINTFLAG_GENERATED | WAYPOINTFLAG_TELEPORT | WAYPOINTFLAG_NORELINK);
+       vector org;
+       org = (e.absmin + e.absmax) * 0.5;
+       org = waypoint_fixorigin(org);
+       w = waypoint_spawn(org, org, WAYPOINTFLAG_GENERATED | WAYPOINTFLAG_TELEPORT | WAYPOINTFLAG_NORELINK);
        dw = waypoint_spawn(destination, destination, WAYPOINTFLAG_GENERATED);
        // one way link to the destination
        w.wp00 = dw;
        dw = waypoint_spawn(destination, destination, WAYPOINTFLAG_GENERATED);
        // one way link to the destination
        w.wp00 = dw;