Repository navigation
Keep crawl spaces pathable after the round-start blocked-area test - #2236
Draft
sunzenshen wants to merge 1 commit into
Draft
sunzenshen wants to merge 1 commit into
sunzenshen wants to merge 1 commit into
Conversation
CNavArea::UpdateBlocked probes an area's center with the base duck hull (59 u). Run 1 s after every round start, it marks blocked for the whole round any area whose ceiling is lower than that, so bots stop pathing through crawl spaces a crouched Recon (46 u) or Assault (48 u) fits through. On ntre_rise_ctg this removes ladder 4's top cap 3589 from every path planned after the first second of a round. Probe with the crouched Recon hull, the smallest player hull, instead.
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
One second after every round start, the nav mesh tests every area for "blocked" (
CNavMesh::TestAllAreasForBlockedStatus->CNavArea::UpdateBlocked( true )): it puts a box at the area's center from 35.5 u above the floor up to the top of the base duck hull (59 u), and if the box starts in solid, the area is marked blocked for the rest of the round. The test is meant for doors and other movers that close over an area. A crawl space whose ceiling is lower than 59 u fails it as well, although a crouched Recon (46 u) or Assault (48 u) fits through, so bots stop pathing through every such area from one second into the round. Paths planned before that second still use it, which is why bots are sometimes seen going through.ntre_rise_ctgladder 4 (355, 376): its top is a 48 u hatch onto the cap area 3589, the only way off the ladder. With harness logging of the forced test, area 3589 is the one area on the map it marks blocked (at round start + 1 s, hitworldspawn). Every path a bot plans after that avoids ladder 4: when its foot's vent cover breaks (#2231), all the bots that were clearing it re-plan, and every one of those re-plans went round another way (17 of 17 in the A/B below), while the paths planned before the first second of the round had gone up ladder 4.What this PR does
nav_area.cpponly, under#ifdef NEO: the blocked test's box now reaches the top of the smallest player hull, a crouched Recon (base duck hull +NEO_RECON_DUCK_MAXHULL_OFFSET, 46 u), instead of the base duck hull. An area that a crouched Recon fits into is not blocked; a door or mover that closes over an area still fills the box and still blocks it.How to test
map ntre_rise_ctg,sv_cheats 1,developer 1,nav_update_blocked(runs the same forced test on every area).Area #3589 ... is blocked(ladder 4's top); with it, no area is listed.neo_bot_quota 12, bots whose path to the ghost room's upper floor runs up ladder 4 keep that path after the first second of the round.Risk
Results
Linux dedicated servers, Release builds of upstream master (at #2203) plus #2231 and #2232 (the two rise ladder PRs) with test-only logging (kills, stuck events, ladder ends, the areas the round-start test blocks, round and match end), without and with this change; the Debug build for the assert check is the same with this change. Every match below reached match end with 0 asserts and a clean exit. XP held at one rank tier per match, rotated across matches.
Which areas the round-start test blocks, 22 maps with ladders, one match per ghost / juggernaut spawn (DM / TDM one match), 172 matches an arm, 30 bots, default damage 1.485, interleaved 8 wide:
ntre_dawn_ctg,ntre_dusk_ctgntre_rise_ctgntre_skyline_ctgntre_disengage_ctgntre_ghost_ctgntre_sentinel_jgrntre_threadplate_ctgntre_vtol_ctgEvery one of these is blocked by the world (
worldspawn), in every match. The areas still blocked with the change have less than 46 u of headroom at their center, so no player fits there either way. (In a separate 81-match run,ntre_rogue_ctgarea 4030 was blocked once by its tank train: movers still block.)Same matches, totals without -> with: kills 5789 -> 5771, rounds won by a ghost capture 12 -> 11, ladder climbs completed up 1017 -> 975, down 153 -> 131, stuck episodes (a bot stuck in one 150 u cell, counted once a match) 2027 -> 2054; on the four maps that changed, 290 -> 286. Near the unblocked areas (150 u):
ntre_dawn_ctg/ntre_dusk_ctg's crouch corridor had short stuck events in both builds (3 bots without, 5 with, at most 2 s each); onntre_skyline_ctgone bot spent 4 s at the edge of 2197, a 17x25 u area 51 u below its neighbor that no bot could path to before. One match a spawn, so per-map counts vary run to run by more than these differences.ntre_rise_ctgladder 4 (navmesh as in NeotokyoRebuild/neoAssets#160), 12 bots, Recons only, the attacking team spawned below ladder 4's vent, the ghost pinned past its top, low damage, 4 matches an arm, both builds with #2231 (so the vent breaks):Debug build: 10 matches (one 30-bot match each on
ntre_dawn_ctg,ntre_dusk_ctg,ntre_rise_ctg,ntre_skyline_ctg,ntre_ghost_ctg,ntre_vtol_ctg,ntre_threadplate_ctg,ntre_terminal_jgr, and two ladder 4 runs as above, 28 ladder 4 climbs completed): 10 of 10 at match end, 0 asserts.Not run: a Windows build.
Toolchain
Linked Issues