From: terencehill Date: Thu, 29 Nov 2018 17:35:04 +0000 (+0100) Subject: Fix issues with the waypoint spawned by the moveto command X-Git-Tag: xonotic-v0.8.5~1705^2~5 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=0ce76eff4ca3109a9353a316fe0276297501bc15;p=xonotic%2Fxonotic-data.pk3dir.git Fix issues with the waypoint spawned by the moveto command --- 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), {