All Rust commits from Facepunch
Update: cleanup ClientVisibilityProvider when disconnecting from the server Tests: disconencted from local server
Merge: from main
Update: dispose netgroups when NetVisGrid gets disabled Tests: booted into craggy and stopped - no errors
Clean: remove Provider.Init method Tests: ran UpdateSubscriptionConsistency test, booted into craggy
Optim: Get rid of NetGroup pre-allocation, use thread-safe lazy allocation Comparing memory snapshots, we go from 2.1mil NetGroups down to 131, saving 140MB Tests: booted to Craggy and ran around. ran UpdateSubscriptionsConsistency unit test.
Clean: move group initialization from PopulateCells to GetGroup Tests: ran around on craggy
Clean: remove Visibility.Manager.groups - also remove all provider == null checks Tests: compiles
Update: add ClientVisibilityProvider - mostly a dud Provider, most methods do nothing - Upodated all places to use ClientVisibilityProvider instead of null This allows to remove groups from Network.Visiblity.Manager Tests: booted into craggy, ran GameTraceTests
Update: instead of iterating all netgroups, add Provider.ForEach(layer, callback) method - get rid of Visibility.Manager.Groups accessor This removes public access to groups dictionary, so almost there to remove it Tests: booted to craggy, opened deep sea and ran deepsea.printentitycount
Update: Visibility.Provider now can create network groups in a thread-safe fashion - organized hardcoded groups into their own collection - Network.Visibility.Manager now defers to provider's GetGroup and TryGetGroup Not sure if I want to support NetworkVisibilityGrid on CLIENT or not, but will try to clean it up in a bit Tests: Booted and ran around on craggy. compiled for all modes separately