]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Added cvar bot_wander_enable
authormand1nga <mand1nga@xonotic.org>
Wed, 20 Apr 2011 05:27:58 +0000 (02:27 -0300)
committermand1nga <mand1nga@xonotic.org>
Wed, 20 Apr 2011 05:27:58 +0000 (02:27 -0300)
defaultXonotic.cfg
qcsrc/server/autocvars.qh
qcsrc/server/bot/navigation.qc

index e4e43babedd96a478cbd97c8b09276378bd63492..142431b44878a5a09f1c1febf3b4aa4399e3f769 100644 (file)
@@ -418,6 +418,7 @@ seta bot_suffix ""  "Suffix behind the bot names"
 seta skill_auto 0      "when 1, \"skill\" gets adjusted to match the best player on the map"
 set bot_debug_tracewalk 0 "Enable visual indicators for short-term navigation. Green: Goal Reached / Yellow: Obstacle found / Red: Unsolvable obstacle found"
 set bot_debug_goalstack 0 "Visualize the current path that each bot is following. Use with as few bots as possible."
+set bot_wander_enable 1 "Have bots wander around if they are unable to reach any useful goal. Disable only for debugging purposes."
 // general bot AI cvars
 set bot_ai_thinkinterval 0.05
 set bot_ai_strategyinterval 5 "How often a new objective is chosen"
index 467838ca2c6afda131d50812077fb803ebcf559b..2a99f50323fe01ea43ae1b837d6a56956ecbf4dc 100644 (file)
@@ -56,6 +56,7 @@ float autocvar_bot_usemodelnames;
 float autocvar_bot_vs_human;
 float autocvar_bot_debug_tracewalk;
 float autocvar_bot_debug_goalstack;
+float autocvar_bot_wander_enable;
 float autocvar_captureleadlimit_override;
 #define autocvar_capturelimit_override cvar("capturelimit_override")
 float autocvar_deathmatch_force_teamplay;
index 95f5d5f0070be99471c02af1cdf4eb7d9de6bff1..e460bdc57e1ad84d2661be3753e5e267e9d75042 100644 (file)
@@ -906,8 +906,10 @@ void navigation_goalrating_end()
 
        // Hack: if it can't walk to any goal just move blindly to the first visible waypoint
        if not (self.navigation_hasgoals)
+       if (autocvar_bot_wander_enable)
        {
-               dprint(self.netname, " can't walk to any goal, going to a near waypoint\n");
+               if not(autocvar_g_campaign)
+                       dprint(self.netname, " can't walk to any goal, going to a near waypoint\n");
 
                entity head;