]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Don't even try to unstuck bots if there are no user generated waypoints; it fixes...
authorterencehill <piuntn@gmail.com>
Mon, 22 Jan 2018 15:15:12 +0000 (16:15 +0100)
committerterencehill <piuntn@gmail.com>
Mon, 22 Jan 2018 15:15:12 +0000 (16:15 +0100)
qcsrc/server/bot/default/navigation.qc

index 3c3f9a8a84e870c021348ce3efea6505453738e7..2bf04bac261aa9b40168000f1e846ccf85b2dc11 100644 (file)
@@ -1808,6 +1808,15 @@ void botframe_updatedangerousobjects(float maxupdate)
 
 void navigation_unstuck(entity this)
 {
+       bool has_user_waypoints = false;
+       IL_EACH(g_waypoints, !(it.wpflags & WAYPOINTFLAG_GENERATED),
+       {
+               has_user_waypoints = true;
+               break;
+       });
+       if (!has_user_waypoints)
+               return;
+
        float search_radius = 1000;
 
        if (!autocvar_bot_wander_enable)