Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use multiple threads for navmesh generation
Navmesh generation can now in parallel in multiple threads. This is configured by g_bot_navgen_maxThreads (sgame) and cg_navgen_maxThreads (cgame). We didn't do this earlier because we had never tried threads in NaCl and were also considering porting to a WASM engine without thread support. The code for generating a little bit each frame for background generation in the sgame is kept around in case we do end up porting to platforms without multithreading. The cgame and /navgen admin command don't have the ability to run only on the main thread for the moment, but it would be really easy to add it if needed. The progress computation for percentage of the navmesh generated has been improved - it now closely corresponds to the actual amount of work instead of falsely assuming that each class has equal difficulty. Co-Authored-by: DolceTriade <vcelestialragev@gmail.com>
- Loading branch information
1 parent
600fb6c
commit e881a23
Showing
4 changed files
with
310 additions
and
102 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Oops, something went wrong.