From a9890f25ac75642f1415bbf04abf1446c14b8354 Mon Sep 17 00:00:00 2001 From: terencehill Date: Sun, 19 Feb 2023 16:23:58 +0100 Subject: [PATCH] Fix waypoints marked as pure but still linked to the world and with collision testing enabled --- qcsrc/lib/warpzone/common.qc | 1 + qcsrc/server/bot/default/waypoints.qc | 11 ++--------- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/qcsrc/lib/warpzone/common.qc b/qcsrc/lib/warpzone/common.qc index 46710db66..0c85d4a08 100644 --- a/qcsrc/lib/warpzone/common.qc +++ b/qcsrc/lib/warpzone/common.qc @@ -582,6 +582,7 @@ bool WarpZoneLib_BadEntity(entity e) case "weaponentity": case "exteriorweaponentity": case "sprite_waypoint": + case "waypoint": case "spawnfunc": case "weaponchild": case "chatbubbleentity": diff --git a/qcsrc/server/bot/default/waypoints.qc b/qcsrc/server/bot/default/waypoints.qc index c1afab673..88ea34de2 100644 --- a/qcsrc/server/bot/default/waypoints.qc +++ b/qcsrc/server/bot/default/waypoints.qc @@ -453,11 +453,7 @@ entity waypoint_spawn(vector m1, vector m2, float f) w.wpflags = f; w.solid = SOLID_TRIGGER; w.createdtime = time; - w.origin = (m1 + m2) * 0.5; - if (waypointeditor_enabled) - setorigin(w, w.origin); - else // don't link into the world, only bots are aware of waypoints - make_pure(w); + setorigin(w, (m1 + m2) * 0.5); setsize(w, m1 - w.origin, m2 - w.origin); if (w.size) w.wpisbox = true; @@ -1295,10 +1291,7 @@ spawnfunc(waypoint) { IL_PUSH(g_waypoints, this); - if (waypointeditor_enabled) - setorigin(this, this.origin); - else - make_pure(this); + setorigin(this, this.origin); // schedule a relink after other waypoints have had a chance to spawn waypoint_clearlinks(this); //waypoint_schedulerelink(this); -- 2.39.2