Fix issues with the waypoint spawned by the moveto command
authorterencehill <piuntn@gmail.com>
Thu, 29 Nov 2018 17:35:04 +0000 (18:35 +0100)
committerterencehill <piuntn@gmail.com>
Thu, 29 Nov 2018 17:35:04 +0000 (18:35 +0100)
qcsrc/server/bot/default/havocbot/havocbot.qc
qcsrc/server/bot/default/waypoints.qc

index 1dfd72bf0d136fb9519a0e51c329dcbd0a5b77a6..a8e10194ef96debb1107ce0e37aba05ae84fc00c 100644 (file)
@@ -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;
                }
index 182b1b3d395d688b4bc39220247e0ed6afbd9e90..8ef440deebfd67eed368bab3862c9d6018066a5f 100644 (file)
@@ -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),
                {