From f18a9f1c86856c280d8dab8590bb72e1f3956f61 Mon Sep 17 00:00:00 2001 From: Alan Shen Date: Sun, 4 Oct 2026 19:40:00 -0600 Subject: [PATCH] Keep nav area attributes when marking stairs CNavArea::TestStairs() replaced every attribute of a stair area with NAV_MESH_STAIRS. MarkStairAreas() runs on every nav load (nav_file.cpp), so a stair area lost its hand-set attributes each time a map loaded, in every match and in every nav_analyze save. Two NeotokyoRebuild/neoAssets meshes mark stair areas this way: ntre_rise_ctg areas 2720 and 2777 (AVOID) and ntre_vtol_ctg areas 149 and 39678 (PRECISE and CLIFF). Their marks were gone by the time a bot planned a path. Set the stairs flag with an OR instead. The line that clears the flag at the top of the function is unchanged, so an area that stops testing as stairs still loses only that flag. --- src/game/server/nav_generate.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/game/server/nav_generate.cpp b/src/game/server/nav_generate.cpp index 4c4e7f8925..f31bf502e1 100644 --- a/src/game/server/nav_generate.cpp +++ b/src/game/server/nav_generate.cpp @@ -1451,7 +1451,13 @@ bool CNavArea::TestStairs( void ) if ( ret == STAIRS_YES ) { +#ifdef NEO + // add the flag rather than replace every attribute, since this runs on every nav load + // and would otherwise erase hand annotations such as PRECISE or CLIFF on stair areas + SetAttributes( GetAttributes() | NAV_MESH_STAIRS ); +#else SetAttributes( NAV_MESH_STAIRS ); +#endif return true; }