From: terencehill Date: Mon, 22 Jan 2018 15:15:12 +0000 (+0100) Subject: Don't even try to unstuck bots if there are no user generated waypoints; it fixes... X-Git-Tag: xonotic-v0.8.5~2376 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=0435ec3177b324c9e07ebf64dbb9b56185240372;p=xonotic%2Fxonotic-data.pk3dir.git Don't even try to unstuck bots if there are no user generated waypoints; it fixes #953 --- diff --git a/qcsrc/server/bot/default/navigation.qc b/qcsrc/server/bot/default/navigation.qc index 3c3f9a8a8..2bf04bac2 100644 --- a/qcsrc/server/bot/default/navigation.qc +++ b/qcsrc/server/bot/default/navigation.qc @@ -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)