From c9d7ad24e97b53b04ac8f51d9196c3a20d82f482 Mon Sep 17 00:00:00 2001 From: terencehill Date: Sun, 19 Mar 2017 17:00:12 +0100 Subject: [PATCH] Use waypoint origin, not player origin --- qcsrc/server/impulse.qc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/qcsrc/server/impulse.qc b/qcsrc/server/impulse.qc index 074175676..7852620cf 100644 --- a/qcsrc/server/impulse.qc +++ b/qcsrc/server/impulse.qc @@ -574,16 +574,18 @@ IMPULSE(waypoint_clear) IMPULSE(navwaypoint_spawn) { if (!autocvar_g_waypointeditor) return; + entity e; vector org = this.origin; bool sym = boolean(autocvar_g_waypointeditor_symmetrical); LABEL(add_wp); - waypoint_schedulerelink(waypoint_spawn(org, org, 0)); + e = waypoint_spawn(org, org, 0); + waypoint_schedulerelink(e); bprint(strcat("Waypoint spawned at ", vtos(org), "\n")); if(sym) { vector map_center = autocvar_g_waypointeditor_symmetrical_center; - org = this.origin; + org = e.origin; org.x = map_center.x - (org.x - map_center.x); org.y = map_center.y - (org.y - map_center.y); if (vdist(org - this.origin, >, 10)) @@ -614,7 +616,7 @@ IMPULSE(navwaypoint_remove) if (sym) { vector map_center = autocvar_g_waypointeditor_symmetrical_center; - vector org = this.origin; + vector org = e.origin; org.x = map_center.x - (org.x - map_center.x); org.y = map_center.y - (org.y - map_center.y); FOREACH_ENTITY_CLASS("waypoint", !(it.wpflags & WAYPOINTFLAG_GENERATED), { -- 2.39.2