The original issue was that the canonical name for a workshop map is formatted as "workshop/pl_aceholder.ugc1234". When the game tried to load a navmesh from the BSP, it would try to load "maps/workshop/pl_aceholder.ugc1234.nav", instead of "maps/pl_aceholder.nav". The fix currently implemented in live correctly uses the "clean" name for the BSP, but also uses the clean name when looking in the MOD directories (effectively everything except the BSP). Since nav_generate saves its navmeshes with the canonical name, they would never be found. This fix only uses the clean map name when looking for files in the BSP.
Screenshots
Checklist
[X] No other PRs implement this idea.
[X] This PR does not introduce any regressions.
[X] I certify that this PR is my own entirely original work, or I have permission from and have attributed the relevant authors.
[X] This PR only contains changes to the engine and/or core game framework
[X] This PR targets the changes branch.
[ ] This change has been filed as an issue.
[X] No other PRs address this.
[X] This PR is as minimal as possible.
[X] This PR does not introduce any regressions.
[X] This PR has been built and locally tested on at least one platform.
[ ] This PR has been tested on all platforms, on both a dedicated server and on a listen server.
Testing Checklist
Client
Server
Version
Windows
Linux
Built, Tested
6.1.7-xanmod1 #1-NixOS SMP PREEMPT_DYNAMIC Tue Jan 1 00:00:00 UTC 1980
Mac OS
Alternatives
This could also be fixed in live tf2 by making nav_generate save files using the clean map name, but it may cause issues if workshop map (canonical) names collide (I have not confirmed if this is possible, but I assume it is).
This was fixed in live tf2, but that fix broke loading navmeshes generated using the
nav_generate
command.Tested using https://steamcommunity.com/sharedfiles/filedetails/?id=2808183313 and https://steamcommunity.com/sharedfiles/filedetails/?id=454812035 (logjam doesn't have a navmesh, it was used to ensure nav_generate still worked)
Related Issue
https://github.com/ValveSoftware/Source-1-Games/issues/4567
Implementation
The original issue was that the canonical name for a workshop map is formatted as "workshop/pl_aceholder.ugc1234". When the game tried to load a navmesh from the BSP, it would try to load "maps/workshop/pl_aceholder.ugc1234.nav", instead of "maps/pl_aceholder.nav". The fix currently implemented in live correctly uses the "clean" name for the BSP, but also uses the clean name when looking in the MOD directories (effectively everything except the BSP). Since
nav_generate
saves its navmeshes with the canonical name, they would never be found. This fix only uses the clean map name when looking for files in the BSP.Screenshots
Checklist
changes
branch.Testing Checklist
Alternatives
nav_generate
save files using the clean map name, but it may cause issues if workshop map (canonical) names collide (I have not confirmed if this is possible, but I assume it is).