branchrust_reboot/main/new_navmesh_fixescancel
143 Commits over 61 Days - 0.10cph!
Fix IsPaused collection-modified exception in RustNavMeshAgent
Fix agents getting stuck when walking exactly along a navmesh edge, dedpulicate state between currentpPolyRef and dtCorridor own polyref
Build libs for all platforms
Fix compile errors from the merge
Fix tiger charging forever at the bottom of vine trees
Use dtCorridor for path following, fix some cases where agents get wedged in a navmesh corner while steering
Fix TryBindNavmesh not updating the cached navmesh
Cache agent navmesh instead of re-resolving it each call (eg independant navmesh vs default navmesh)
Fix find closest edge not working (never worked), making scientists not actually favour covers close to walls, fix AIs getting stuck when navmesh tile is rebuilt under their feet / on their path, prevent findPath from the agent position reprojecting when we already have a valid polyref, expose polyrefs in path
Fix npcs getting stuck when navmesh tile rebuilds while they are in it or crossing it
Fix independant navmesh bounds not using the monument bounds, and always being fixed with the default values from AddComponent, fix AIs spawned before an independant navmesh is built being unable to find it
Fix cargo scientists not moving
Fix old scientists trying to steer instead of turning instantly
Fix Scientist2 on Oilrig crouchwalks upstairs at a weird angle
Fix scientists not spawning in underwater labs and cargo ships
▍▋▅▊▋█▆▄ ▋▍▄ ▉▋▍▉ ▍█▋ ▉▌ ▄▋ █▊▋█▋
▋▌█▅▇▆▄ ▍▄ ▄▆█▉▌ ▋▆▋ ▆▅▍▍█▇
More automated tests for croc/wolf/tiger foundation jump/destroy behaviors, fix bug where cancelled/stale tile request would delete the tile after failing
Cleanup wolf foundation jump test
Add test for wolf leap on foundation, not cleaned up yet
Do not calculate remaining distance twice
Optimize fsm wait for navmesh
Disambiguate rust nav mesh helpers
Fix sample radius being insufficient to check if player is on navmesh
Fix leftover comment and stale dll
Also fix allocs and stack overflow in navmesh load, fix potential leak, remove debug.break
Fix stack overflow in navmesh save, stackallow is not scoped to for loop but actually methods, also use writer.BaseStream.Write instear of writer.Write because the latter copies and allocates in Unity... Also fix potential bug in the way we check for null tiles
Add build artefacts for all platforms
Remove debug.break left by accident
Fix tile seams not being perfectly aligned because of quantization
Fix bad merge for vine tree fix
FIx missing tiles because of too much height and too little cellHeight, causing spans to not have enough range
Change min region size to meters, include oom logs
Fix old tile remaining after failed tile rebuild, which will cause it to exist in native but not in managed, and be ignored by saves
FIx borders not being right now that we rely on only one physics query to decide if we build normal or hires
Fix tile bounds height being too larged when passed to create heightfield
Fix navmesh load failing because of invalid tile count, just because it has more than
10000 tiles which is possible
Cleanup unused variables and redundant comments
Speed up new navmesh gen by x1.6
- optimize height and alpha terrain sampling to avoid redundant bounds check / deep sea / wrapping / dispatches, have terrain meshing work inplace on the buffers instead of using pooled vertex and index pooled lists
- avoid using rust native list, it's not really pooled it just reallocates the internal native array everytime it's unpooled, use custom one (may be overkill, will check later if native array is good enough), bypass pooling these by using [ThreadStatic] buffers
- replace cancellation tokens with lightweight tileCancellation classes just wrrapping volatile bool, we just need the object reference to act as a build version to avoid locks and stale results, tokens are massive if allocated per tile and add complexity, and a lot of features go unused
Do monument/player build collision check required for hires navmesh, as part as normal geometry collection not another pass
Fix log spam " Trying to use new navmesh despite -useNewNavmesh not being set on server boot."