Repository navigation
Bots avoid neo_npc_targetsystem via nav PVS - #2179
Merged
sunzenshen merged 6 commits intoOct 17, 2026
Merged
Conversation
sunzenshen
added a commit
to sunzenshen/neo
that referenced
this pull request
Oct 1, 2026
… into the research branch
sunzenshen
force-pushed
the
bot-avoid-npc-turret-pvs-0927
branch
from
October 3, 2026 17:51
c79a868 to
4b30e7c
Compare
This was referenced Oct 5, 2026
sunzenshen
force-pushed
the
bot-avoid-npc-turret-pvs-0927
branch
from
October 12, 2026 03:55
4b30e7c to
f317bf4
Compare
sunzenshen
marked this pull request as ready for review
October 13, 2026 01:18
sunzenshen
force-pushed
the
bot-avoid-npc-turret-pvs-0927
branch
from
October 15, 2026 04:09
f317bf4 to
5237977
Compare
sunmachine
requested changes
Oct 17, 2026
sunmachine
requested changes
Oct 17, 2026
sunzenshen
force-pushed
the
bot-avoid-npc-turret-pvs-0927
branch
2 times, most recently
from
October 17, 2026 05:25
fddcc44 to
7485aec
Compare
sunmachine
self-requested a review
October 17, 2026 05:45
sunmachine
previously approved these changes
Oct 17, 2026
sunmachine
left a comment
Contributor
There was a problem hiding this comment.
This is looking good so long as we merge it in after #2260
The tank's motion vision ignores a cloaked player only under 180 u/s. A Recon walks at 200 and a sprinting bot is faster still, so cloak alone spent charge without hiding the bot. Release run and hold sneak once the cloak is on, as CNEOBotCommandFollow does, which keeps every class under the threshold (walk speed 150 or less).
Mark the tank's own area once per team: a targeted team gets the visible-area hazard, which already includes the deadly marking, and other teams get the deadly marking alone. Replace a one-shot lambda left from an earlier functor with a plain if/else, and fix the header comment, which described adjacent-area marking that was never done. No behavior change.
The turret mark that tells bots to cloak was set only on the tank's own area and its target's, while the tank's deadly mark spread to every area it can see. A bot elsewhere in its sight retreated without cloaking. The mark now spreads to the same visible areas; teams the tank does not target still get only the run-over mark on its own area, which gives no reason to cloak.
A bot in a hurry for the objective skips the hazard retreat, so it never reached the retreat's cloak near the tank. In the tank's line of fire it now cloaks and keeps going; a cloaked Assault holds off sprinting to stay under the 180 u/s the tank's motion vision ignores, while a Recon keeps its pace and Support or the carrier cannot cloak.
A bot chasing on DEFAULT_ROUTE treated every area the tank can see as impassable, so a hurrying interceptor stalled when no detour existed. The turret mark is no longer also written as a deadly mark, so the hurry penalty for hazards that are not deadly (NeotokyoRebuild#2260) now covers it: in a hurry a bot crosses the tank's sight at a large path cost and still detours when a detour exists. Grenades and the tank's own area (run over) stay deadly, and every other hazard check counts the turret mark as before.
sunzenshen
dismissed
sunmachine’s stale review
October 17, 2026 05:55
The merge-base changed after approval.
sunzenshen
force-pushed
the
bot-avoid-npc-turret-pvs-0927
branch
from
October 17, 2026 05:55
7485aec to
1ab1e19
Compare
sunmachine
approved these changes
Oct 17, 2026
sunmachine
left a comment
Contributor
There was a problem hiding this comment.
Still good. Still approved. Thanks for merge/rebase.
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
In casual mode
ntre_rogue_ctgruns a scripted tank (neo_npc_targetsystem) on a loop round the roads. Bots had no notion of it and walked into its line of fire: in 8 test matches its turret took 15 % of the kills.On ntre_rogue_ctg with the NPC tank (
neo_npc_targetsystem), bots avoid the tank by querying the hazard avoidance system. The tank updates that hazard with areas approximating its line of sight.Navmesh PRs that rely on this
None. NeotokyoRebuild/neoAssets#158 (
ntre_rogue_ctg) beats master with the tank and without it on bot code that does not have this PR, so it does not wait on it. This PR addresses what the mesh cannot: bots walking into the tank's line of fire.Testing
Local bot matches on this branch plus harness logging, with a test-only switch between upstream behavior and this PR. ntre_rogue_ctg, 12 bots, default damage, ghost pinned at each of the 5 spawns x 10: 100 matches, 50 an arm, all ended cleanly with 0 asserts.
Known side effect: most of the new "no path" failures come from bots chasing the enemy ghost carrier (
ctgEnemy) while the carrier stands where the tank can see. The hazard takes those areas out of pathing, so the chaser cannot build a path to its target. That probably explains part of the capture rise as well: carriers are harder to chase down, not only safer from the tank.Walking while cloaked (review fix, 2026-10-16)
The tank ignores a cloaked player only below 180 u/s, but a Recon's base speed is 200, so a cloaked retreat still drew fire. Bots now release run and hold sneak while cloaked during the retreat (walk speed: Recon 150, Assault 120). Measured against this PR before the fix: ntre_rogue_ctg, Release build, 12 bots, ghost pinned at each of the 5 spawns x 32 with the rank tier rotated, 160 matches an arm, all ended cleanly.
Deaths to the tank fall by 0.29 a round [-0.53, -0.04], at every rank tier. While retreating cloaked, Recon is at or above 180 u/s on 3 % of ticks (was 66 %) and Assault on 1 % (was 39 %); the tank killed 2 of 139 such bots (was 33 of 183).
Cloaking in the tank's sight and hurrying past it (2026-10-16)
Rebased onto current master. Three commits on top:
neo_bot_path_penalty_hurry_hazard_multiplier(default 20) only when no detour exists. This branch is built on top of Let hurrying bots path through smoke hazards #2260 and adds no path-cost code of its own.ntre_rogue_ctg, Release build: 5 matches, one per ghost spawn, all ended cleanly with 0 asserts. 80 matches an arm against the rebased previous head (12 bots, rank tier rotated):
After rebuilding on #2260 (
7485aec6c): 1 match on ntre_rogue_ctg with the multiplier set to 25, ended cleanly with 0 asserts. Rebased onto master after #2260 merged (1ab1e19ef, no change to this PR's files): 1 match on ntre_rogue_ctg, Release, ended cleanly with 0 asserts.Toolchain
Linked Issues