Skip to content

Let a ghost carrier clear a breakable in its path - #2207

Draft
sunzenshen wants to merge 3 commits into
NeotokyoRebuild:masterfrom
sunzenshen:bot-carrier-clear-breakable
Draft

sunzenshen wants to merge 3 commits into
NeotokyoRebuild:masterfrom
sunzenshen:bot-carrier-clear-breakable

Conversation

@sunzenshen

@sunzenshen sunzenshen commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Description

What it does

A bot clears a breakable in its path (CNEOBotPathClearBreakable) only while it sees no threat, so it fights first.
A ghost carrier does not attack a threat it sees, so it waited at the breakable while the threat stayed in sight.
This PR skips that wait for a ghost carrier, both when the action starts and while it runs. The carrier switches
to its knife or secondary as any bot does, breaks the glass, and goes back to the ghost, or to its secondary while
the threat stays in sight, as the carrier's weapon handler decides.

Navmesh PRs that rely on this

None. The stall shows on ntre_marketa_ctg with the navmesh merged in NeotokyoRebuild/neoAssets#159: one way onto
the roof crosses a window of two func_breakable_surf panes.

How to test

  1. Build, start a CTG match with bots on ntre_marketa_ctg (ghost spawn 10 or 19 sends the carrier to the window).
  2. Watch the carrier at the window while an enemy is in sight: it now breaks it and moves on, where before it
    stood there.

Risk

A carrier with a threat in sight spends 1-3 s breaking glass instead of standing still. With a threat in sight it
already holds its secondary, not the ghost, so nothing the ghost beacon depends on changes. Bots without the ghost are
unchanged.

Cost

One extra IsCarryingGhost() call (a walk of the bot's weapons) a tick, only while the bot has a threat in sight.

Results

Release dedicated server, upstream/master f426c22 v this branch, both with the same harness-only telemetry; 30 bots,
CTG, ghost spawn pinned, 1 round, XP rank held at one tier for all players and rotated across the spawns.

On the marketa navmesh merged in NeotokyoRebuild/neoAssets#159 (neoAssets master), every ghost spawn once plus
spawns 10 and 19 four more times, 28 matches a build. The window is the only func_breakable_surf any carrier met;
carriers from spawns 9, 10 and 19 route through it.

master this branch
matches where a carrier stood at the window with weapon_ghost, an enemy in sight 3 0
carrier stuck events at the window 25 0
matches where a carrier broke the window 0 4 (8 panes, 0.7-3.1 s each, milso / kyla / knife)

In every match on this branch where the carrier reached the window, it started on the first pane with an enemy in
sight. The same runs on the mesh this PR was first tested on (the #159 mesh before merge, with dead links cut) give
the same picture: 49 stuck events at the window in 3 of 28 matches on master, 0 on this branch, 5 panes broken.
Ghost captures, 28 matches a build: 2 on master, 3 on this branch; rounds mostly end by elimination, so no outcome
claim. No asserts in 4 Debug matches of this branch on marketa.

Toolchain

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

Linked Issues

A bot clears a breakable in its path only while it sees no threat, so
it fights first. A ghost carrier does not fight a threat it sees, so it
waited at the breakable for the rest of the round. On ntre_marketa_ctg
carriers stood at the window onto the roof: 40 of 42 of their stuck
events there had a threat in sight, through or past the glass.

Skip that wait for a ghost carrier, both when the action starts and
while it runs. It switches to its knife or secondary, breaks the glass
and goes back to the ghost.

Measured on a research build: 3 of 3 carriers that reached the window
broke both panes, 0 stuck (11 stuck events in 2 of 8 runs without the
change). A 96-match screen on marketa, transit, rise and dusk showed
no new stuck spot involving a breakable or a carrier.
IsCarryingGhost walks the bot's weapons, and the tactical monitor asks
every tick, so test the cheap threat visibility first.
@sunzenshen
sunzenshen force-pushed the bot-carrier-clear-breakable branch from a7359be to 9e82d30 Compare October 12, 2026 03:54
The two comments at the threat check still described the rule before
the carrier exception, and the helper only reads the bot, so it takes
a const pointer.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant