From: terencehill Date: Mon, 22 Jan 2018 15:38:33 +0000 (+0100) Subject: Anticipate bot_wander_enable check X-Git-Tag: xonotic-v0.8.5~2375 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=74ebef39c27c149de6bedc424c240768a809074f;p=xonotic%2Fxonotic-data.pk3dir.git Anticipate bot_wander_enable check --- diff --git a/qcsrc/server/bot/default/navigation.qc b/qcsrc/server/bot/default/navigation.qc index 2bf04bac2..7b80a1a6f 100644 --- a/qcsrc/server/bot/default/navigation.qc +++ b/qcsrc/server/bot/default/navigation.qc @@ -1808,6 +1808,9 @@ void botframe_updatedangerousobjects(float maxupdate) void navigation_unstuck(entity this) { + if (!autocvar_bot_wander_enable) + return; + bool has_user_waypoints = false; IL_EACH(g_waypoints, !(it.wpflags & WAYPOINTFLAG_GENERATED), { @@ -1819,9 +1822,6 @@ void navigation_unstuck(entity this) float search_radius = 1000; - if (!autocvar_bot_wander_enable) - return; - if (!bot_waypoint_queue_owner) { LOG_DEBUG(this.netname, " stuck, taking over the waypoints queue");