From 0ce76eff4ca3109a9353a316fe0276297501bc15 Mon Sep 17 00:00:00 2001 From: terencehill Date: Thu, 29 Nov 2018 18:35:04 +0100 Subject: [PATCH] Fix issues with the waypoint spawned by the moveto command --- qcsrc/server/bot/default/havocbot/havocbot.qc | 2 +- qcsrc/server/bot/default/waypoints.qc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/qcsrc/server/bot/default/havocbot/havocbot.qc b/qcsrc/server/bot/default/havocbot/havocbot.qc index 1dfd72bf0..a8e10194e 100644 --- a/qcsrc/server/bot/default/havocbot/havocbot.qc +++ b/qcsrc/server/bot/default/havocbot/havocbot.qc @@ -1603,7 +1603,7 @@ float havocbot_moveto(entity this, vector pos) { // Step 5: Waypoint reached LOG_TRACE(this.netname, "'s personal waypoint reached"); - delete(this.havocbot_personal_waypoint); + waypoint_remove(this.havocbot_personal_waypoint); this.aistatus &= ~AI_STATUS_WAYPOINT_PERSONAL_REACHED; return CMD_STATUS_FINISHED; } diff --git a/qcsrc/server/bot/default/waypoints.qc b/qcsrc/server/bot/default/waypoints.qc index 182b1b3d3..8ef440dee 100644 --- a/qcsrc/server/bot/default/waypoints.qc +++ b/qcsrc/server/bot/default/waypoints.qc @@ -193,7 +193,7 @@ entity waypoint_spawn(vector m1, vector m2, float f) // spawn only one destination waypoint for teleports teleporting player to the exact same spot // otherwise links loaded from file would be applied only to the first destination // waypoint since link format doesn't specify waypoint entities but just positions - if((f & WAYPOINTFLAG_GENERATED) && !(f & WAYPOINTFLAG_NORELINK) && m1 == m2) + if((f & WAYPOINTFLAG_GENERATED) && !(f & (WAYPOINTFLAG_NORELINK | WAYPOINTFLAG_PERSONAL)) && m1 == m2) { IL_EACH(g_waypoints, boxesoverlap(m1, m2, it.absmin, it.absmax), { -- 2.39.2