Repository navigation
Fix bots repeatedly roaming nearby spawn points in roaming game modes like JGR - #2318
Open
sunzenshen wants to merge 5 commits into
Open
sunzenshen wants to merge 5 commits into
sunzenshen wants to merge 5 commits into
Conversation
A bot switched to the juggernaut behavior only during the pre-round freeze. JGR respawns players mid-round, and a respawned bot restarts its behavior tree, so it roamed spawn points for the rest of its life: it never went for the juggernaut item, never attacked the enemy juggernaut and never escorted a friendly one. Switch whenever the game type is JGR.
A roaming bot picked random spawn points. On maps whose spawns stand in one room, a bot in that room picked the next spawn there and walked spawn to spawn for minutes. A protected spawn room that no route reaches made it worse: each failed pick was re-rolled, so the picks piled onto the reachable room. Refuse a roam goal the bot can already potentially see, wander to a random nav area once a spawn pick has no route, and exclude info_player_start by classname (the old test compared the targetname).
The view check counts a spawn point on the floor below as hidden, so a bot on a two-floor spawn cluster kept picking the spawn under it and had to take a ladder to get there. Skip a roam goal closer than sv_neo_bot_seek_and_destroy_roam_min_dist horizontally, like one in view. The last wander try still takes any point.
A goal on another floor right above or below the bot is a legitimate place to look around: skipping it threw away an unseen area to explore. Remove the horizontal distance check and its ConVar; the ladder stuck spot it targeted on ntre_bullet_tdm is a separate fix.
Expose the number of random roam goals to try as sv_neo_bot_seek_and_destroy_roam_goal_tries (cheat, default 10) and reword the roam comments.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Bots in JGR switch to the juggernaut behavior only during the pre-round freeze, so a bot that respawns mid-round never goes for the juggernaut and roams instead. Roaming picks random spawn points, and on maps like ntre_terminal_jgr, where one team's spawns sit in one room and the other team's raised spawn can't be entered, bots walk spawn to spawn in that room for minutes.
This PR switches respawned JGR bots to the juggernaut behavior. Roaming now skips goals the bot can already potentially see, falls back to a random nav area when a spawn pick has no route, and no longer picks
info_player_start.Toolchain
Linked Issues