2,627 Commits over 639 Days - 0.17cph!
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
Update: recycle SpinUp layer sounds on disable
Tests: none, trivial change
Bugfix: Flamethrower now works if continuing fire after quickswitching
Tests: in editor, did normal firing with quickswitching intermixed
Bugfix: Flamethrower sounds leaking or missing, pt1
- Recycle sounds when destroyed or holstered
- Start play pilot sound on deploy (used to only take effect after firing)
- Cleaned up a bunch of comments and whitespaces
There's one more bug to do with holding the fire button while quick switching away and back to flamethrower, that's next.
Tests: in editor fired and quick-switched away then monitored audio.printsounds
Bugfix: fixing misplaced call in CompoundBow
Tests: none, trivial change
Bugfix: avoid leaking compound bow sound loop
- Also added sound recycle on destroy
It was just one instance that would be cleaned up on switch-back to bow per player.
Tests: in editor pulled the bow till max, quick-switched away, checked via audio.printsounds that it was gone
Update: recycle sounds when destroying a BaseLiquidVessel
Tests: none, trivial change
Update: recycle sounds when PhoneController is destroyed
Tests: none, trivial change
Update: recycle sound when MobileInventoryEntity is disabled
Tests: none, trivial change
Update: recycle sounds when RadiationOverlay is disabled
Tests: none, trivial change
Update: recycle sounds on SoundFollowCollider disable
Tests: none, trivial change
Update: CoalingTower stops it's effects on client side
Shouldn't have any effect now since we don't despawn them, but will avoid pooling issues in the future if we suddenly start
Tests: none, trivial change
Merge: from main
Tests: Rode the zipline on craggy back and forward, ran around the island and monitored pooling logs
Merge: from profiling_improvements
- Moves core of ServerProfiler to an unmanaged DLL - this deals with various mod issues and massively reduces recording overhead (less than 10% vs previous up to 7x).
- Snapshot marks are prefixed with assembly name
Tests:
- 3 times in a row: Generated snapshot in editor on Craggy
- 5 times in a row: Generated snapshot in Release standalone server with 6k world and 190k entities (with borked and good harmony mods)
- 3 times in a row: Generated snapshot in Debug standalone server with 6k world and 190k entities (with borked and good harmony mods)
- Built Wint64 client (debug and relase); booted up release
Update: Avoid shipping ServerProfiler to clients
- Done by deleting the dll after it's built
Tests: Build Win64 Client Debug and Release - no more dll
Update: added Assembly name to the snapshot marks
Makes it a bit clearer where calls are coming from at the expense of larger snapshot(compressed: 2mb -> 7mb, json: 50mb->140mb). But, since the profiler is much faster now, the snapshots are smaller on 6k servers.
Tests: exported 2 snapshots from Editor's Craggy, and exported 5 from standalone 6k server
Bugfix: Prohibit constexpr initialization of mutexes in ServerProfiler.Core
Turns out the toolset I'm using produces non-binary compatible assembly - using an escape hatch to avoid this issue. This only manifested in standalone builds.
Tests: exported 5 snapshots from procgen 6k world in a row over 2 minutes. Used both borked and good hamony mods as well.