993 Commits over 274 Days - 0.15cph!
Merge: from main
Tests: none
Bugfix: Prevent game-object pooling if done mid-scene switch
- When MonoBehaviours are being destroyed due to scene switch, it can cause an invalid transform hierarchy modification, causing an error
MonoBehaviors can clean up their resources in OnDisable, which can cause them to be pooled - example: AmbienceWaveSounds.
Tests: validated it doesn't affect entity pool warmup sequence (as we create->retire there). Using `log.level Audio 2` and a bit of 100% code-forcing the issue, disconnected 3 times:
- without the fix, it was 100% generating an error on disconnected
- with the fix, had 0 error reports
Merge: from main
Tests: none
Clean: reduce code duplication for BasePlayer.WaterFactor
Tests: none, trivial change
▅█▆▋▊: ▊▌▌▍ █▆▉▍█▊▍▊▌▌▉▅_▋▆█▊▇
▄▉▌▆▇▆ ▆▇▄█▉▆ ▄ ▅▅▄▌▊ ▇▍ ▆▍█▄▍▌▋ █▍ ▇▅▋▄▆▊▆▄▋▅ ▄▆▊█▆█▇ - ▋▋▇▅▍▊ ▅▋ ▄▄ ▄▋▆█▉▋ █▊▆▋▆▌▉▍::▍▄█▇▊▊█▆▊▊▅▍ ▅▌ █▉%, ▊▇▆ ▉▆▇▉▋█▉▅▌▄▊▅ ▍▆ █ ▆▌▅▌▄█ ▊▌▄▊ (▇▉▊▊▆▋ ▅▌▊▍ ▋▉ ▉▋▌▅▉▊▆▄ █▅ ▋ ▋▊▊▇ ▌▇▋▍▇▆)
▌█▍▌▉: ▉▇▉ ▇▇ ▆▊▊▆▇▍, ▌▍▍▊▄▅▅▌ ▌▍▊▇▇▉▌▄▇▇ ▋▇▍ ▆▍▄▌ █ ▅▋█▄▄▇ ▍▌ ▉▌▍▋ ▅▊▆▄▄▉▍▍▆ - ▌▉▆▇▆▉▄▄▉ ▍▌▋▊▄▇█▌ ▍▆▇█▍ ▍▄▊▅▄▅▌▆▇▄▍ ▆▇▆ ▅▋▋▋▍▋ ▍▍▅▍▉▉▌ ▊▅ ▉▋▊▋ ▌▊▅▋ ▄▉▍▆
▉▉▅: `▅▆▄█▇▉▇▄.▅▍▍▉▄▇▍_▌▇▋▄▋▇▇██▊▍▌▅█` ▄▇▍▆▄▆▉ █▌▅▅▇▋ ▇▆ ▌▅▊▊▉▉▌ ▇▉▋▋▋ ▌▉ ▋█▋ ▅▉▅▊▍▆▄▅::█▇█▉▌█▊▄
- ▅▉█ ▇▅ ▊▍▅ ▍██▇▉▋▌ ▅▋▇▅▅▅▊, ▍▍▊█▅▅ ▇▋ ▊ ▇▄▊ ▊▄ ▆▄▊█. ▊▍▊▉▌▊▊▋ ▉▇ ▌▉▇▉▌ ▉▊▉▊▋▉ ▋▋▅▌▅▆▌▄▌▌▊.
▊▊█ ▆ ▍█▄▍▌▇ ▊▄▍ ▄▍▉▋▅▇▊█ ▍▍▍ ▅█ ▋▊█▋ ▊▋▉ ▅▌▊ ▄▊▉ ▅▉ ▋▌▅▅▋▅▋.
▅▋▄▌█: ▅▆▋▋▉▄█▋ █▉ ▄▋▌█▌▅, ▇█▅ ▊▆▅▋▄▋, ▋█▇▍█ ▋ ▋▌▆█▌▄▍█▊▄ █▄ ▆▌█▆▆▇▉▌ ▆▍▆▆ - ▍▉▋▄▋▉▅▋▍ ▌▆ ▍▉▄▄▄█ ▍▉ ▉▋▅█▅▆▉▅
Update: comments
- fixed spelling mistake
- added an explanation for invalidation of cached tick state
Tests: none, trivial change
▄▊▇▇▇▇: ▅▉▋▄▊▄ ▆▌▊▉▍ ▆▄▌▆ ▉▌▉▄▉ ▆▄▄▆ ▌▌▌▌▅▊█▊ ▆▍ ▄▄▌▆██▄ ▅▍▆▄▋▍
- ▌▍█▋ ▌▆▋▄▅ ▉█▆▌▅▇▊▄▄ ▇▍ ▅▌▆▋▉▅▉▉ ▅▅▌▅▅▍▄, ▍▊ ▌▉ ▇█▌▌▉▇ ▄▉▇▊█▌▅▊▋ ▌▍▊▋ ▅▊▋▆▍▄ ▊▆▅ ▌▄█▍▆▉▄ ▉▆▍, ▋▇ ▉ ▉▆▌▊▆, ▊▉▇ ▅▄▆▍▊▍ ▊▆▍▌▌ ▅▍▋▆▆█
▉▊▊▆▉▄▍▇▊▅ █▇▆ ▋▄▋▋ ▋▄▅▄▉▊ █▆ ▇▅▌▆▊▌, ▄▊▆ ▊▍▌ ▅▉'▄ ▇▉▄▋ ▅▌ ▋▄▋▇▅ ▍▆▅█ ▄▄▅▍▆▍ ▄▅▄ ▇█▋▍▄▄▌▊▆▍(▌▉▉, ▌▆█▊▄▄▌▉▌▋)
▉▌▊▍▊: ▅▇▅▆, ▇▄█▋▅▋▄ ▋▉█▋▆▆▌
▌▊▇▅▌: ▉▊▉ █▇▇ ▅▇▊▊ ▆▋▄▋▍▍ ▅▅▄▄▅▊▌▇▆▅
- ▆▌▊▊ ▅▅▋▉▆▇▆▅▅▅ ▊▊▍▍▍ ▌▆▊▋▍▋ ▉▇▅▋▍▌▆▆▆ ▄▇▋▍ ▉▅▍▉▉▊▊▄ ▄▍█▉▋▌▇ ▇▍▉ ▄▋▍▊▌▊▌▇ - █▍▌▍▄▇▌ ▄█▌▍, ▋▅▅▆ ▊▉█▋▅ ▆▍▌▍▇
- ▉▆▄▄ ▌▇▇▊▆ ▅▊▅▅▌▅▊ ▋█▉▇▅█▍█ ▆▅▇▍▊▄▉▅▌▉.▉▄▌▄▉█▉▄▍▍▉ ▉▇▉▊▉, ▉█▇▉▅▄▇▉ ▋▋▍█▄▅▊▉▆▉▇▄▋▊ ▍▄▌▅ █▍ ▍▋ ▋▌ ▇▅▉▄▌▇
██▊▆▆: ▌▉▅▄▌▇ ▍▆▌▆▉▋▌▉▆▋▄▊█ ▊▄ ▍▄▄▍▉▊ ▋▍▄▌▇▉, █▄▉ ▊▄▊▉▍ █▍▊▋▇▋ █▊▉ █▌▆▊ ▆▍█▄▅, ▆▋▆▇ ▋▇▅▆▇▉▊▅ ▍▍▌▊▊▄█▇▉ ▋▅▅ ▇▊▄▅ ▌ ▆▅▄▉▌▇▌ ▋▄▅▆▊ ▄▇▍▍██▌ - █▍▉▌▄▋▉█▉ ▄▍▄▇ ▄▇▅ ▇▉▊▅▉▍
▊▇▌█▆: ▊▄▉███▍▌ █▄ ▆█▄▉▌▌ ▅▌▆▆▄▋▌▅▋▆▅ ▊█▌▌ ▉▇▅▊▅▄▉▆ ▍▊▍▌▅▌▍ ▊▌▅▇█▉▉▆
- ▆▌▆█▋▆ ▆▇█▉▆▋▄▍▌▊▌▊▉ ▇▊▄▍ ▋▆▋▉▆█▅ ▇▆▍ ▅▍▌▍▉▌▍▊▆ █▆▌▅▌▋
▄██▌▍: ▅▉▅▌, ▉▆▍▊▄▌▇ ▆▍▋▍▍▍
█▄▆▋▊: ▊▉▉█ █▉▋▇▆█▆▄::▅▇▋▋▆███ ▌▍▍▍▇ ▆▄█▆▄ █▌▌▌▅ ▄▋▍ ▇▋▉▅▋▇▌ ▄▄▄▉▋▆▉ ▋▆▋▊ ▊▊▅▆▉
- ▆▅▆▍ ▇▅▇▅▋▄▆ ▅▋▍▊▆▉▄ ▆▆▍▍▉▋▍▅ ▉▄██ ▅▋ ▄▅ ▆▄█▇█ ▌▋▌▌ ▋▄ █▍▇▅█▄▉ (▌▄▉▇▊█▄▆ ▉▆▋▆ ▌█▄▉ ▊▊▋▅ ▊▇ ▉▅ ▅▋▋▉▅▆▍▍)
▇▉▍▄▊▌█▄▇▅▇█▅ ▉▌▉▇▇▊ - █▋ ▌▍█▉█▆ ▌▊▉ ▄▇▇▋▌▆▉▍ ▍▋▆▊▌█▄▅ ▍▉▍▅▅▋▉█ ▅▉ ▊█▉▆▉ ▉█▋▅, ▍▄▇▊▉▄▇ █▍ ▆▅▄████▋ ▍█▇▆▋▌▊ ▇▊▅█-▊▅▊▆ ▄▇▄ ▄▉▍▇▅▌ ▆▊▆▄█▅ ▍▅ ▌▌▊▍█▌ ▆▅ ▋▆▍▍ - ▍▌▋▉ ▍▍ ▅▇▇▌▋▉▇ ▉▍▅▊ ▉▌█▅.
▆▌▇▄▆: ▊▉▌▌▋▊▇▅ ▌█▍▊▄ ▉▄▊▌▍▄ ▄▉▍ ▌▄▉▅ ▇ ▉▋▋▄█▉▊▇ ▉█▉▄▅ ▆▅▊▉▆▄▉ - ▇▇█ █ ▍▆▍▋▊▋▌▇▉ ▆▋ █▅██▄█▆█ ▆▆▌▍▌▇▆ ▆▌ █▊▄▅ ▇▆▄▆▊▍▊.
▊▋▆▋▅: ▊▇▌▋▉ ▊▆▉▋▇ ▍▋▆▉▌ ▅▍▄██▊▇ ▄█▇ ▆▌▍▊▅▄▉▊::▅▊▍▅▄▊▇▌▅▄
▇▆▄▊ ▅▉▄▋▋▋▇ ▉ ▆▆█▇▆▋▇▍▉ ▇▇▄▅▌, ▌▍▍▇▄▉█▆ ▋▆▆▊▋█▉▇▆▌ ▆▊█▊ ▋▊▇▊▉▆▉▍ ▌▄ ▉▇▊▅▌▇▊ ▌▄ ▍█▅▄▊▄▌(▇▆▄▉▋██▆ ▅▆▍█▍ ▆▋▌█ ▆▅▇▌▇▉▍▆█ ▉█▆▉▉▋▉▋)
▌▆▌▆▆: ▄▌█▍▉▇▅▌ ▌▆▊▋▌ ▉▊▍▍▊▅ ▇▇▌ ▄▍▉ ▊▆▌▆▇█ ▍▅ ▄▄▉██▍. ▊▄▉▋ ▆ ▉▌▋▅ ▍▋▌▉▋▍▍ - ▆▌█▇▍▄▇▊ █▋▊ ▊▋█▅▉ ▉▋▉.
Clean: further comments
Tests: none, trivial change
Clean: fixed comments
They got out of date from my initial experiments.
Tests: none, trivial change
Optim: reimplementing List.Compare extension via hash->sort approach
- Only implemented for ref types for now, but can be extended to value-types as well
- Has a limitation of requiring no duiplicates in queries lists
- Dependent on the hash quality - we have a slow, quadratic path when a hash collision occurs
- Measured performance - largest case (2048, 512) is an order faster than previous impl (0.75ms vs 12.5ms)
Goal was to reduce the number of hash lookups from the original algorithm and to reduce it's quadratic nature.
Tests: Ran the unit tests - all pass
Update: rewrote ListExtension test to soon-to-chan
- Also added a perf test
- Measured initial implementation's timings - (2048,512) takes 12.5ms on average
I've been working on an optimization that requires me to use ref-types rather than value-types
Tests: run the test in editor, all cases pass
Optim: remove dead bots from global tracking
- Removed now unnecessary null check when simulating bots
Tests: on craggy spawned 15 bots then killed them - counter went up and down accordingly. Flew around 3.5k procmap, gave it a soak test. Both cases no NREs.
New: console command to report bot count on the server.
Tests: loaded into 3.5k procgen world and used the command
Merge: from soundmodulator_leak
Fixes an audio-related NRE when performing generic interactions (zipline, bike, etc).
Tests: rode the zipline on Craggy a bunch of times(the whole way and with quick jump-off). Couldn't repro the NRE (though couldn't do it originally anyway)
Bugfix: Avoid double-recycle of sounds when pooling is disabled
- switched to checking recycle time
it used to rely on whether fade modulator was present or not as a flag, which doesn't work when pooling is disabled. And we can double-recycle now via NotifyOnParentDestroying and OnDisable
Tests: none, but super-confident about the theory
Merge: from main
Tests: none, trivial merge
Merge: from soundmodulator_leak
Disabling audio pooling to mitigate SoundModulator NRE in BlendedSoundLoops
Tests: on Craggy ran around, rode the zipline, hunted animals. Also left it to stew for a bit - no exceptions
Update: disable client-side sound pooling
- Gives us time to track down the missing bad-pooling scenario
Tests: on Craggy ran around, rode the zipline, hunted animals. Also left it to stew for a bit - no exceptions
Update: Adding a wait statement
- Using it to help debug issues with procedural world not running world generation.
Tests: ran LoadProcTest - it waited
Update: Delete the symlink on end of test run
This was previously causing deletion of blobs on unity close/open
Tests: ran LoadProcTest couple times
Merge: from soundmodulator_leak
Hopefully improving stuttering audio for ModularCrane in bad server conditions
Tests: while connected to a local staging server moved the arm and rotated the cabin
Update: simplify MagnetCrane's audio handling
- this is an experiemental change, as in theory it should help stuttering audio, but couldn't validate in practice
Tests: while connected to a local staging server moved the arm and rotated the cabin(though I couldn't reproduce the original issue anyway)
Merge: from main
Tests: none, no conflicts
Update: change indent_style to 4 spaces
Tests: regenerated projects and tabbed a couple times - it's spaces
Update: PerfFwkManager can switch scenes
- Done via a basic command interpreter (same as ConsoleSystem, just supporting coroutines)
- renamed PerfFwk.IsReady to IsDone
Tests: ran the LoadProcTest - asserts validated the switch is done, but no proc gen happening yet
Update: Executing deferred command and waiting for it's execution
- also fixed the deferred command not being executed because it's missing the prefix (this took weirdly long to spot)
Using it to pass control for the actual testing top the game assembly
Tests: Ran LoadProcTest, it passed
Hackfix: skip bootstrap smoke test at the start
- Key here is skipping error logs, since they trigger test failures.
Right now we build this weird mutant executable, and it tries to run server-side smoke test despite being on client. It emits an error, that we can't suppress that early, and which tips over the tests. I'll need to fix this properly once I got better build pipeline control.
Tests: ran LoadProcTest - it passed (though it's mostly a dummy test)
Buildfix: added missing namespace qualifier
Tests: none, trivial change
Bugfix: resolve location of asset bundles when running standalone perf test
- Also symlinking server bundles instead of client, for now
Tests: ran the LoadProcTest, no more logs of failing to open bundles
Merge: from main
Tests: none (big merge, going to fix any issues in follow up commits)
Merge: from VendingMachinePooling
Fixes a minor bug that caused Vending Machine's protobuf pool to inflate
Tests: spawned a vending machine on craggy, saved, loaded craggy again - marker was present. Monitored pooling stats - seemed normal.
Bugfix: avoid inflating VendingMachine's protobuf pool
- Rewritten with relying on pooling
Tests: spawned a vending machine on craggy, saved, loaded craggy again - marker was present. Monitored pooling stats - seemed normal.
Merge: from soundmodulator_leak
- Fixed sound leaks from quickswitching scenarios
- Fixes wrong loop sound being played when coasting on a pedal bike
- Fixing flamethrower not playing sound when quickswitching while holding fire button
- Fixing pilot sound not played on taking out a flamethrower
- Recycle footsteps when their sounds end, instead of potentially incorrect preset time
Tests: played with a lot of weapons and vehicles while monitoring sounds via audio.printsounds and log.level Audio 2
Merge: from main
Tests: Booted editor - no errors
Update: drop sound instances for variety of types on disable
- HarborBridge
- HarborCrane
- PhoneDialler
Tests: none, trivial changes
Bugfix: Stop DigitalClock from leaking sound instances when it's flags change
- Also dropping sound refs on disable
Tests: none, trivial change
Update: drop sound refs when vehicles are destroyed
- Magnet Crane
- MLRS
- Modularcar Garage
- VehicleModuleSeating
- Traincar audio
Tests: none, trivial changes
Update: drop sound refs when ScrapTransportHelicopter is destroyed
Tests: none, trivial change
Clean: removing empty override method
Tests: none, trivial change
Update: drop sound refs when AttackHelicopter is destroyed
Tests: none, trivial change
Update: drop sound references when ground vehicle is disabled
Tests: rode a pedal bike, jumped of and destroyed it with console commands - saw expected debug log
Undo: of the previous undo to ensure we don't hold dangling references
Although the resources are cleaned up, the pointers are not so we end up with stale pointers on entity recycle
Tests: none, trivial undo
Undo: Partial undo of recent work to remove unnecessary DoClientDestroy callbacks
- Turns out we already invoke cleanup for sounds that are attached to network entities - meaning we don't need to manually handle it in these cases.
Was confused why pedal bike wasn't leaking it's sounds on destroy, and tracked it down to above mechanism.
Tests: Tested compound bow and flamethrower still work and don't leak sounds
Update: recylce RotateWhenOn's sound loop
Tests: none, trivial change
Update: sanity-recycle sounds when procedural lift is disabled
Tests: none, trivial change