The new mapping was never applied on the disjoint set, causing the indices to be off during traversal table building. Also made the initialization of the disjoint set the responsibility of dtCreateDisjointPolyGroups.
Set it to the first usable one instead of "none" since we will be using the anim types a lot more often than "none". Also removed some extraneous separators to enhance the UX.
Everything 'dtAlloc', 'rcAlloc', 'dtAlloc', 'dtFree', got renamed into 'rdAlloc', 'rdFree'. There were a lot of object allocators that used these suffixes which were not accounted for causing those to be renamed. Everything has been renamed back to their original names (excluding the actual rdAlloc/rdFree functions as these were supposed to be renamed).
No code logic was changed in this commit.
The accidental renaming was caused in commit fa8d89d287752782ebdd5d9563f04fa72ef0bee9
The editor now takes the static pathing data into account when creating paths/testing the navmesh using the NavMeshTesterTool or CrowdTool. An option is made allowing you to select which traverse anim type you want to use for pathing (each of them uses a different traversal table, thus giving them different options as to which links and jumps they can take).
This allows us to test AI withing the editor itself, thus saving a lot of time shuffling navmesh files around and reloading them in-game.
(unsigned short)-1 (65535) is technically a valid poly group. We also count from 2 as 1 is reserved for unusable poly's, and 0 was reserved kept reserved for simplicity so just use 0 as the null identifier.
- Separate disjoint set and traversal table building code
- Use game types and data to determine what to build into the traversal tables (e.g., 5 traversal tables for _small and only 1 for the rest).
- Automatically initialize the editor using the _small navmesh parameters instead of the broken defaults.
There was always a problem dealing with core integral types accros various projects, since we typically only use IDA's pseudo definitions for rebuilding decompiled functions. It however did define almost all the integral types we use throughout the SDK. These types have been commented out and a new header has been made that defines everything we need (and we can add more in the future if this deems necessary). This new header is included with tier0/basetypes.h, so all projects have access to it and the tier0 headers will work out of the box without defining anything new.
These values seem to generate navmeshes that are almost identical to Titanfall 2 single player navmeshes in terms of geometry calculations per navmesh size. Its likely these are the actual values used internally to create these.
Mathlib doesn't use some of the game-specific mutex stuff, but since our tools is now also including the mutex utilities, we have to block them out for _TOOLS as well.
This fixes a bunch of linker errors when trying to use tier0 utility code in new projects while not utilizing the rest of the library. We don't need to export the CThreadMutex stuff as everything we build is static. Only the logging functions should be exported, these are therefore using DLL_EXPORT explicitly.
Don't merge poly islands under the same group id if there's an off-mesh connection linking the 2. The off-mesh connection polygon also gets its own group id now.
The reason we don't want to merge them is because not all ai can take the off-mesh link under on the same navmesh, and if we merge them the ai would still try and reach a goal poly it couldn't, causing it to become hard stuck on the poly island's boundary.
The static pathing code is split into 2 elements, the disjoint sets (poly groups), and the traversal table (which links poly groups, visually known as poly islands) together through jump or offmesh links. Reachability covers more than just traversal in the context of this game engine, therefore it has been renamed to avoid future confusion.
The current implementation was mixing several types with each other, making it hard to determine what a hull and what a navmesh type is. Code has been refactored to use the new types and names introduced in commit e638cc9323c7b74279f0274591264efc53c29d4d.
this has to be done in the future to finalize this, for the time being, a workaround in scripts can be implemented using CodeCallback_OnNavMeshHotSwapBegin and CodeCallback_OnNavMeshHotSwapEnd (destroyingon begin, restoring on end).