]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/bot/default/navigation.qc
Don't even try to unstuck bots if there are no user generated waypoints; it fixes...
[xonotic/xonotic-data.pk3dir.git] / 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)