branchrust_reboot/main/useplayerupdatejobs3cancel
60 Commits over 59 Days - 0.04cph!
▊ ▌▊▌ ▇██▄▄▆ ▅▌ ▆▇▅█▉▆▉▉▇ ▅▍ ▉▋▄▇ ▅▊▋▌▊ ▋▆▉▆█▍▊▉▋ ▍▌▊█▉▊▆▅▅█▊▋▊██▍ ▄▅▇▄▇ ▇▆██
█ ▉▄▅▋█▌ ▍▄▇▆▉▋▅▉█ ▅▇▇█▇▅▊▋▍▌ █▅█▆▌▉▉ ▄▋ ▍▌▉▇▄▉▋▆▋ ▆▉ ▍▄▇ ▅▉▄ ▍▄▌▆▍▆▅▌ ▍▊▉▋█▊▄ ▋█▊▉▊▄▆▌ ▉▌▌▉█▍ ▇▋▇▋▌▊▉▅█ ▄▊ ▇█▄ ▌▆▉ ▇▉ ▉▆▊▋▉▌▄▊ ▅▇▇▄▊▋ ▍▉ ▌▆ ▍▊▄▉▉▍▊
▌ ▌▅▄▅▉▌ ▅▇▌▇▊▍▍█▅▆▌▇▉▍▆ ▊▌▄▅ ▅▋▌ ▌▇▇▍█▌▄ ▆▌▍▅▄▍ ▉▄▋▇▊▆█ ▍▆▊▍▋▆▉ ▅▆▄ ▍▇▄▆█▉▄▋ ▉▅█▌█▌▆▉▄▊ ▊▅▊▉▍▆▍▊▋█ ▅▆▆▌▄ ▋▍▋▄▊▄▉▊▊ ▅▅▄▄▌▋ ▊▆▅▌▉▅█ ██▋▇▌▋▊▉▆▌▊▌ ▊▌▉██▊▅█▄▇▌ ▆▍▌▄▋ ▍▄█▇
▊ ▌▊▄▆▍ ▆▉▄▅▅ ▅█▍▍▇▋ ▇▇▉▄▌▄▊ ▊▍▊▇ ▅█▊▉▋ ▉▊▋▅▋▅▉█▄▊▉▅▇▅▄ ▅▄ ▉▌██▆▋ ▌▄ █▇ ▇▍▇▊▉▉▇ ▌▆▆▅▄ ▆▌▄▍▆ ██▇▋▉▅▅ ▍▌ ▅▇▇▌▍ ▄▇▋▅▉▋▄
▍ ▋▆▇█▌▉▍▆▍ ▊▆▉ ▇█▍▊▆▌▆ ▋▇▋█▆▉▇▆ ▍▅▇▅▊▅ █▇ ▉▆▋▆▆▌▆ ▇▅ ▍█▅▋ ▋▅ ▄█▆▅▉▍▋▄▌▉▇▍▅ ▉▉▉▇▌ ▅▇▇▉▉▍▌▅▇▆▇▅▅ █▆▄▇▊█▄▍▇ ▋▅ ▌▋▍▌ ▄▋▊▇ ▄▇▊▇▋█▌▆▆ ▇▊▉▊▋▇▍▋▄
Ensure last grounded position in parallel checks is written immediately before rewriting in air state
- all new consistency tests pass now
Clean(tests): add messages to new checks to know which permutation and player diverged
Tests: ran the modified test
▌ ▋▋▊▆▍█ █▊▉▇█▄▊ █▇▅▇▉▋▉█▌▋▅▋▍▉█▉▋▆ ▅▄▍▆▄▆█ ▍▇ ▆▅▄▆ ▌▆ ▋▌▄▄▆▅█ ██▍▍██ ▄▌▄▅▌ ▅▆▍▋ ▅▆ ▌▍ ▊█ ▇▆▋▉▇█▅▋▇██▄▋▊█▆▅▌▍▌▉▆ ▄▆▅▊▇ ▄▋▋▆▆▉▄ ▅▆▆█▅▄
Update(tests): TestIsFlyingConsistency now also compares computed flying states
- Reset flying state between test runs
Tests: ran tests, level 1 passes but level 3 now fails
Bugfix(tests): make AntiHack tests spawn players with colliders
Tests: ran all AH tests, all pass except for 1 already known
Update(tests): rewrite TestIsFlyingConsistency to better mix various players
Need to figure out why playerr-on-player test doesn't detect player, will do next
Tests: ran unit test, detects an issue on level 1
OnPlayerRemovedFromCache now calls ResetAntiHack directly instead of juggling matching implementations
- AddTempSpeedHackBudget now supports useplayerupdatejobs 3
- Cache removal clears all non-forgiveness states for speedhack/flyhack
- ResetAntiHack now clears speedhack/flyhack serial states regardless of useplayerupdatejob
Update: set UsePlayerUpdateJobs 2 as default
- codegen
Tests: none, trivial change
Clean(tests): fix formatting inside Test.AntiHack.cs broken by auto conflict resolution
Tests: compiles
Clean: simplify sync from flying cache back to players
Tests: none, trivial change
Clean: annotate AreFlying jobs with context comments
- got rid of ref and added ReadOnly in a couple places
Tests: compiles
Pack parallel flying results, only pass valid indices to flying checks, remove the now unused waterindices
- consistency tests pass
Bugfix: ensure AntiHack states are properly expanded when going from Jobs 2 to Jobs 3
Tests: sanity test on craggy in editor, switched Jobs 2 to 3
Clean: one more unnecessary playerCache passing
Tests: compiles
Bugfix: ensure SpeedhackStates and FlyhackStates have sufficient storage
- remove playerCache propagation where we already pass a ReadOnlySpan
Tests: ran unit tests
Handle missing LastGroundedPosition in cache add/removal
Ensure player fly/speed states are expanded when a new player is added to the PlayerCache, preventing out-of-bounds when initCap is exceeded
Clean(tests): replace more handrolled index set generation with AntiHackTests.GenerateIndexPermutations
Tests: ran all afected tests
Bugfix(tests): use 1^-5 epsilon for water level consistency in TestWaterLevelsConsistency
Tests: ran unit test
Fix speeding/flying consistency tests not passing when useplayerupdatejobs is >= 3
merge from useplayerupdatejobs3/jobify_is_flying_2
Merge: from useplayerupdatejobs3/free_tasks
- New: fork of Cysharp/UniTask with less allocs
- Optim: reduce allocs around tasks in Jobs 3 mode
Tests: jobs3 on craggy with 2 players, built client and booted
Merge: from defer_tick_analytics
- Optim: start analytics tasks earlier to avoid blocking main thread
Tests: Jobs3 on craggy in editor
Optim: save on action alloc when setting up tasks for UpdateSubs_AsyncState
Tests: none, trivial change
Merge: from updatesubs_optim
- Optim: player subscriptions can be updated in parallel (Jobs 3 feature, currently disabled)
- New: unit & perf tests for net group updating
Tests: unit tests
Clean: refactored NoClip perf tests to use Utils.MeasureAndPrint
Tests: ran noclip perf tests
Clean: fix stream of warnings from running AntiHackTests
Tests: ran noclip tests
Update(tests): added perf tests for IsSpeeding and AreSpeeding
AreSpeeding is slower at 50 players, but faster at 200 players (probably transient allocs).
Tests: ran unit tests
Clean: simplify TestNoClipConsistency unit test
Tests: ran updated unit test
Bugfix: uncomment tickState caching
Left it commented because I thought it would help with unit test validation, but it's completelly unrelated to my unit tests.
Tests: on Craggy tried to sprint with UsePlayerUpdateJobs 0
Update(tests): cover all speedhack_protection levels in tests
Tests: ran unit tests
Update: expand isspeeding test coverage by generating index permutations
Revealed a bunch of false-positive access violations, fixed by sprinkling NativeDisableParallelForRestriction (hate it)
Tests: ran unit tests
Update: add a couple more test positions for unit tests
Tests: tests pass
Update: move normal calculation logic to HeightMapQueryStructure
- Give couple methods a rename
Tests: ran unit tests
Bugfix: basic arespeeding unit tests now pass
- use the right interpolators for IsSpeeding
- add overloads to TerrainHeightMap.GetNormalsIndirect and antihack specific jobs to accept deferred arrays
- make IsSpeeding work on CachedState
Tests: ran unit tests