Repository navigation
Bots step off a ladder crouched through a crawl gap - #2232
Merged
sunzenshen merged 1 commit intoOct 17, 2026
Merged
Conversation
A ladder whose top exit is a gap only a crouched body fits through, such as a vent or a low window, was never left: the dismount check sweeps the standing body, finds the gap's top in the way, keeps the bot climbing past the ladder's top, and the stall check then jumps it off. When the standing sweep is blocked but a crouched body at the ladder's top clears, duck, hold the feet just above the top and move out toward the landing (along the face for an exit beside the ladder, where a press into the face would climb). Seen on ntre_rise_ctg ladder 3, whose exit is a 52 u window.
This was referenced Oct 15, 2026
sunzenshen
marked this pull request as ready for review
October 15, 2026 03:59
sunmachine
approved these changes
Oct 17, 2026
sunmachine
left a comment
Contributor
There was a problem hiding this comment.
Oh, this one actually passed. 🍏
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
A ladder whose top exit is a gap only a crouched body fits through, such as a vent or a low window, is never left by a bot climbing up. The dismount check (
IsDismountBlocked, from #2162) sweeps the bot's standing body toward the exit, finds the gap's top in the way, and keeps the bot climbing to clear it, as it would for a parapet. Nothing above the gap clears, so the bot climbs to the top of the ladder brush, stalls, and the stall check jumps it off the ladder.ntre_rise_ctgladder 3 (-219, -952, 200 u) is one: its exit to the floor at z -336 is a 52 u high window in the shaft wall, its sill level with the ladder's top. A crouched Recon (46 u) fits with its feet in the 6 u between -304 and -298; a standing one never does. Climbers fell back down the 200 u shaft again and again.What this PR does
neo_bot_ladder_climb.{h,cpp}only:IsCrawlOnlyExit: from the ladder's top (4 u above it) toward the exit, a standing body is blocked and a crouched one is clear. For an exit beside the ladder the sweep runs along the ladder's face, the way the bot can move on the ladder. Within 64 u below that height the climber ducks.MOVETYPE_WALK) and given 150 u/s along the face (40 u/s up), with no key held while it is in the air beside the ladder: a press toward the face grabs the ladder again. On landing on the gap's sill it walks out to the landing crouched (PlayerLocomotion::Approach).Other ladders are unchanged: the crawl test needs the standing sweep blocked and the crouched one clear from the ladder's top, which a parapet (blocked both ways at that height) or an open exit (clear standing) never is.
How to test
map ntre_rise_ctg,sv_cheats 1,neo_bot_quota 12,nb_debug behavior, join spectator, and watch ladder 3's top at (-219, -952, -304) from the floor north of the shaft (z -336).Risk
OnStart), and the dismount already kicks the bot toward the exit with a velocity.Cost
Per ladder-climb update while going up within 64 u of the top: two
UTIL_TraceHullsweeps (standing, then crouched only when the standing one hits). One point trace when the bot is set in the gap.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 #2231 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_ctgladder 3, up (navmesh as merged in NeotokyoRebuild/neoAssets#160; both builds also carry #2231, so bots reach the ladder from the ghost room). 12 bots, Recons only, the ghost pinned past the ladder's top, low damage, 4 matches a spot:Without this PR the bots that do get through land in the window by chance from the stall's jump off (the airborne crouch). The remaining failures with it: climbers that reach the top before they have crouched, and climbers whose goal changes mid-climb.
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 #2231). The crawl dismount started once in the 172 matches, on
ntre_terminal_jgrladder 8, and reached its landing. Ladder climbs completed, without -> with: up 1087 -> 1068, down 169 -> 188; kills 5725 -> 5916; stuck events 1685 -> 1200, a difference carried by single matches on maps where neither change fired.Debug build: 14 matches (six
ntre_rise_ctgladder runs and eight 30-bot matches onntre_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
Each on
ntre_rise_ctgladder 3, bots spawned in the shaft or at the vent, 2-4 matches an arm:Toolchain
Linked Issues
ntre_rise_ctgit is what lets bots reach ladder 3 from the ghost room.