432 Commits over 184 Days - 0.10cph!
Fix error from trying to stop one shot animations when the player is already gone, for e.g. when exiting network range.
Attach cannon ball to hands when reloading cannons.
Run ocean simulation GetHeights in parallel, 2x~ faster with 100 player boats.
Make NativeGrid cell size match the behaviour of the managed Grid<T>, fixes GetNode() fetching out of bounds nodes.
Use temp job allocators for deep water checks
Fix gestures not playing audio unless you play a different gesture, transition back to the entry state when ending a gesture. (playable graph quirk)
Reset playable graph state on disable to hopefully fix more pooling issues.
Reimplement deep water checks in batched buoyancy
Implement water volume checks for batched buoyancy, adds NativeGrid<T> (and an untested parallel version for later).
Make waterinfo blittable.
Move most of buoyancy writeback into burst, add burst batch access for flow direction.
Make buoyancy write back 10x faster, still needs to be bursted. Fix warnings from temp allocs that weren't needed at all.
Fix workshop player models not playing their animations.
Clear indicesToCheck list before reusing it for water collision ignores.
Fixes native crash from projectile batching, and buoyancy batching breaking after enabling the deepsea.
(Hopefully) Fix player animations sometimes being left in weird states because of pooling.
Clean up the way we release animation handles to make sure the input ports always get disconnected regardless of whether the handle is valid or not, release handles when pooling players.
Fix crash from accessing null playable graphs and playables when releasing animation handles.
Validate graphs when setting animation handle progress - fixes cannon reload error spam.
merge buoyancy batching progress to main, off by default. toggled by `buoyancy.use_batching`
Fix player models continuing to play animations in demos when paused.
Burst the rest of buoyancy, now the batched version is 2-3x faster than the original. Still missing some edge cases but its functional for boats.
Remove flow map from shared burst data, I forgot to undo this change earlier.
- Reuse list buffer in water collision checks.
- Add shared static accessor to TerrainMeta to access terrain position/size from burst.
- Make more buoyancy native arrays persistent, reuse them. (temp job allocs seem a lot heavier than just temp allocs.)
- Make GetFlowDirection easier to access from burst, not yet burst compiled
- Burst compile GetBuoyancyWaterInfoBatched, temporarily remove deep underwater checks from it, we'll move deep water checks to a different code path.
Things seem functional, but only slightly faster than the non batched version. A lot of terrain data access still isn't batched.
Fix water collision jobs in buoyancy throwing exceptions due to temp allocator use.
Further optimize GetBuoyancyWaterInfoBatched, let topology queries run in burst(no batch yet), batch water ignores.
Batched Buoyancy is now functional, but still missing some code and needs more optimization:
- Move buoyancy data into persistent arrays and reuse them.
- Add convar for switching between batched/old buoyancy.
- Add 3D positions for water info step.
- Add Ocean Simulation.GetHeights span overloads for interop with native arrays. (they still need a XZ3D step, otherwise we'd use the native arrays directly - TODO later.)
- Add GetBuoyancyWaterInfoBatched. (wip, missing entity fast paths for inside terrain/above water)
- Shim Ocean simulation into WaterSystem.GetHeightArray_Native, it's already batched, works for now.
Fix world model outlines not displaying when using skip domain reload.
Still heavily wip, run the watermap jobs from burst.
Start tracking buoyancy components to track them, split batches into deepsea/mainland.
merge from main to fix playmode
Fix playmode being broken due to outdated protobuf serializer or merge conflict.
Make grid constructor parameters optional to support static field codegen.
merge boat perf optimizations to main
Use child entity count for MotionToggle cache invalidation.
Add parameterless constructor to Grid<T> to make it compatible with reset static fields code gen.
WIP, it's getting annoying to drag these changes across branches:
- Move a good chunk of buoyancy into burst.
- Add burst methods for filling buoyancy point data arrays.
- Introduce methods for running buoyancy in a batch rather than on every component separately.
Make terrain height and shore vector methods readonly to indicate that they're pure.
Add indexer to pooled array, add extension for copying managed arrays into native arrays. (intended for smaller collections)
Replace broadcast motion with a cached version (staggered update every 60f), reduces Client.Update from 4.5ms~ back to 1ms~ with 15 boats.
Fix leg animator causing the player model to clip through the camera in first person mode.
Fix `-nosteam` no longer working in editor. (Preferences -> Facepunch -> Disable platform services editor pref)
Add modified script for generating a list of Job Safe Unity APIs.
Fix odd cannonball loaded position, move it to the back of the barrel.
Stop reload sounds when dismounting the cannon, fix cannon barrel impact sounds.
Show toast for only being able to place cannons on player boats, Fix reload animation error spam on cannons from invalid playables.