Skip to content

Bots break a vent cover in a crawl gap along their path - #2231

Merged
sunzenshen merged 1 commit into
NeotokyoRebuild:masterfrom
sunzenshen:bot-breakable-in-crawl-gap
Oct 17, 2026
Merged

sunzenshen merged 1 commit into
NeotokyoRebuild:masterfrom
sunzenshen:bot-breakable-in-crawl-gap

Conversation

@sunzenshen

@sunzenshen sunzenshen commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

For testing with NeotokyoRebuild/neoAssets#168: this PR is one of the two components of #2239, which merges it with #2232 into one branch to build. Review and merge this PR on its own; #2239 is for testing only.

Description

A bot whose path runs through a crouch-height gap closed by a breakable vent cover never breaks the cover. It presses against it until its stuck handling gives up and it leaves. The path follower's look for breakables (CNEOBotPathObstacles, from #2197) keeps a breakable only when nothing else stands in front of it on the way, and checks that by sweeping the bot's standing body along the path. In a crawl gap the standing body meets the gap's lintel first, so the cover is dropped as "something else is in front of it". The look also stopped at the first segment of the path that is not walked on the ground, so from inside a duct that the path leaves by a drop, there was nothing to sweep at all.

ntre_rise_ctg hits both: ladders 3 (-219, -952) and 4 (355, 376) stand in shafts entered through such gaps, each a 56 u high slot closed by a func_breakable vent cover (health 5). No bot ever climbed either ladder: bots crouch-jump onto the slot's sill, press the cover, and leave after about 5 s; bots that come down ladder 3 into the shaft press the cover from inside.

What this PR does

neo_bot_path_obstacles.cpp only:

  • The cover is checked against a crouched body too. When the standing body meets something before the breakable, the same sweep is run with a crouched body (crouch hull height), and the breakable is kept if that body reaches it first. A breakable behind a crate, a door or a wall is still dropped, since a crouched body meets those first as well.
  • The look for breakables runs on to a drop's ledge. A DROP_DOWN segment's position is the point past the ledge at the height of the floor above, which the bot walks to before it falls, so that leg now counts for breakables. The prop detour keeps sweeping ground legs only.

How to test

  1. map ntre_rise_ctg, sv_cheats 1, neo_bot_quota 12, join spectator.
  2. Watch the vent at (-240, -916, -476), the way into ladder 3's shaft from the ghost room. Without this PR, Recons that path up ladder 3 crouch-jump onto the sill below the vent and stand pressing it. With this PR they knife or shoot it (PathClearBreakable), crouch through, and reach the ladder.

Risk

  • Bots break covers they used to stand at. Every such cover is on a path the navmesh says is walkable, so the cover was in the way.
  • The extra sweep runs only when the standing sweep meets something other than the breakable first, and only for a breakable already within reach of the path (one UTIL_TraceHull a path leg up to it).

Results

Linux dedicated servers, Release builds of upstream master (at #2203) with test-only logging (kills, stuck events, ladder ends, round and match end), without and with the change; the Debug build for the assert check is upstream master with this PR and #2232 plus the same logging. Every match below reached match end with 0 asserts and a clean exit. XP held at one rank tier per match, rotated across matches.

ntre_rise_ctg, the two vents (navmesh as merged in NeotokyoRebuild/neoAssets#160). 12 bots, Recons only, the attacking team spawned at the vent's room, the ghost pinned past the ladder's top, low damage so the run is about movement, 2 matches a spot:

bots that mounted the ladder without with
ladder 3, spawned in the ghost room (272) 0, 0 8, 8
ladder 3, spawned in its shaft, path out north through the vent 6, 6 (the climbers) 12, 6
ladder 4, spawned below its vent (145) 0, 1 0, 3

At ladder 4 every bot that reached the sill broke the vent; most then re-planned another route, because the engine's round-start blocked-area test marks ladder 4's top area (under a 48 u hatch) blocked one second into the round, so every path planned after that avoids the ladder. That is a separate fix, not in this PR.

22 maps with ladders, normal play (one match per ghost / juggernaut spawn, 172 matches an arm, 30 bots, default damage 1.485, interleaved 8 wide; the "with" build also carried #2232). This PR's crouched sweep kept a breakable 8 times in the 172 matches: breakable furniture props (stools, a shelf) on ntre_marketa_ctg (4) and ntre_tarmac_ctg (1), a glass pane on ntre_rogue_ctg (1, found on a drop's ledge leg), a breakable panel on ntre_threadplate_ctg (1) and ntre_rise_ctg (1, a window). Elsewhere the two builds run the same code paths. Totals without -> with: kills 5725 -> 5916, ladder climbs completed up 1087 -> 1068 and down 169 -> 188, CTG captures 11 -> 17 of 153 rounds; stuck events 1685 -> 1200, a difference carried by single matches on maps where neither change fired (one match a spawn, so per-map stuck counts vary that much between runs).

Debug build: 14 matches (the six ntre_rise_ctg ladder runs above and one 30-bot match each on ntre_rise_ctg, ntre_terminal_jgr, ntre_marketa_ctg, ntre_rogue_ctg, ntre_threadplate_ctg, ntre_tarmac_ctg, ntre_saitama_ctg, ntre_ridgeline_ctg): 14 of 14 at match end, 0 asserts.

Not run: a Windows build.

Approaches tried and dropped

  • CROUCH strips on the slot sills in the navmesh: the bots already hold a crouch there (the crouch-jump's duck is held by the lintel). Posture was never the problem; the cover was.

Toolchain

  • Linux GCC Distro Native (Linux Mint 22.3, GCC 13.3.0)

Linked Issues

A bot whose path runs through a crouch-height gap closed by a
func_breakable vent cover never clears it: the check that nothing
stands in front of the breakable sweeps the standing body, which
meets the gap's lintel first, so the vent is dropped and the bot
presses against it until the stuck monitor gives up. Sweep a crouched
body when the standing one meets something else first.

The look for breakables also stopped at a drop segment, so a bot
leaving a duct by a drop had no path line to sweep. A drop's ledge is
walked at the height of the floor above before the fall, so that leg
now counts for breakables (the prop detour keeps ground legs only).

Seen on ntre_rise_ctg, where ladders 3 and 4 stand in shafts entered
through such vents: no bot ever climbed either before this.

@sunmachine sunmachine left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmed!

@sunzenshen
sunzenshen merged commit 32e28a2 into NeotokyoRebuild:master Oct 17, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bots Related to bot players

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants