1,374 Commits over 457 Days - 0.13cph!
Initial setup to fix scientists trying to shoot through glass
Fix scientist corpses showing "ScientistNPC2" in the loot panel, instead of the localized name for (previous commit didn't go through)
Fix scientist corpses showing "ScientistNPC2" in the loot panel, instead of the localized name for scientists
Add more descriptive error logs to help find cause of NRE NpcBarkComponent.PlayConversation
Fix Cannon.adminfire dict same key add error, ai noises now have a unique id for comparison purposes
▄▊▋▌▊▋▆ ▉▌ ▉▇▇ ▆▌▉▊▇▌▅▄█▍ █▇▋▋▊▋▍ ▅▄▉▅▆▍▌ █▊▌▄▌
- properly embed navmesh saving and loading in SaveRestore flow
- use proper override save/load path if set
- use debugEx to not extract stackTrace when logging
- respect nav_disable convar
- fix empty tiles being null after loading from save, no tile should ever be null even if empty, this causes issue when queuing for rebuild at runtime
- consolidate redundant code paths into navmesh init, and add tile
- skip saving if navmesh was never built
Potential fix for ais getting stuck when the last point of their path lies on a boundary edge, and the last edge is perpendicular to it
Fix error when build happens before navmesh is initialized
Have DecayEntities affect navmesh at runtime when spawned and destroyed by default (remaining todo exclude IOEntity, AnimatedBuildingBlock, BaseTrap, etc)
Follow Daniel's advice of merging two redundant code paths into one
Preserve meshCache old behaviour by adding submesh tris to another field
Cancel running tile building operations if the tile is re-queued
Fix potential issue where request to rebuild tiles are ignored if the tile is currently being rebuilt, as it'll then be desynced with the geometry, add more profile markers
Try a holistic approach to detect entities that can trigger a navmesh rebuild, remove component on foundation and barricade, fix navmesh not being rebuild sometimes after entity gets destroyed (collider still detected in same frame, or client collider picked up in editor), increase navmesh definition in and around player constructions
Fix meshes not being properly collected, log time when building navmesh synchronously, fix not accounting for biome specific ores when adding nav blocker
Move everything to ai namespace, delete unused classes, move navmesh params to own file, add more safety checks in native code when creating empty navmesh, also save/load pending build operations, ignore trees, add navblocker to ores
Changing number of threads via convar will properly end the active threads and create new ones, remove unused fields, re-hook loading from save if it exists
Do not allow queueing again tiles that are actively being rebuilt, removes the need for locks on the hashset. Maybe we need to remove from the queue the tile, and add it to the end of the queue if someone asks to rebuild it again.
Replace concurrent queue and semaphore with blocking collection for job requests, and ConcurrentQueue with ConcurrentBag for job results (order does not matter)
Fix tile never being removed from dict if using sync mode
Reserve some background threads for the navmesh
- Get rid of recast demo space partition structure, after profiling deeper turns out it's slower in our use-case
- Allow tile gen to be fully synchronous with no time slicing for easier profiling
- Fix part of the world not generating
- Re-add support for different resolution in monuments
- Try out various methods of culling tris / mesh decimation, no perf improvement
Time slice tile rebuilding that happens on main thread
Fix loading code not assigning navmesh wrapper to the ptr after creating it, fix null tiles not being handled properly
Move saving/loading code to c#, fix potential issue when some tiles are null
Fix NRE when shooting ballistas and canons
Fix tile being added on background thread instead of main thread after refactor, fix tile being added twice
Test splitting tile building in steps instead of building at once from native code, to potentially be able to spread a single tile over multiple frames in case of runtime rebuilds, or cache intermediate building steps
Increase voxel resolution in navmesh tiles overlapping monuments, instead of having a different navmesh for scientists
First pass on dynamic nav obstacles
Prepare migration of entities currently having a navObstacleComponent
Merge from ai_scientist_iteration
Use unitask for async operations
Tune generation param so that hires navmesh tiles have the same size as lowres ones, for easier stitching
- Speed up geometry collection (lots of culling was actually losing perf when done at scale and relying on recast chunkyMesh)
- Fix terrain gen being very low res and not respecting alpha (go back to using existing baked terrain code we were using before)
- Speed up tile rebuild
- Fix tile rebuild giving very different results from initial build