12,921 Commits over 2,345 Days - 0.23cph!
Fix GetUnmountedWaterFactor NRE
Still run UpdateCelestials in headless mode (needed to set IsDay and IsNight on the server which things like solar panels use)
Fixed magnet crane not marked as Can Sleep (I swear I did this last week)
Early return from the DroppedItem underwater check if the attached rigidbody is sleeping (it's unlikely to change submerged state while sleeping)
Removed Vis.Entities from the artificial light and temperature calculations for growables, now queries a Grid of light and temperature sources
These paths are now completely physics free
Merge from relationship_optim
Added PersistentObjectWorkQueueListBacked, a new version of PersistentObjectWorkQueue that can be provided with a separate list to iterate over
Handy for situations where we don't want to maintain a separate list of objects to iterate over, we can now just provide a list and the work queue will iterate over it
Doesn't have Add or Remove methods as it only reads the list
Updated RelationshipUpdateQueue to iterate over player list instead of a separate, identical list
Added an experimental fast path to UpdateAcquaintancesFor that checks the server occlusion state to see if two players can see each other rather than raycasting
Much faster than a raycast, although it will still fall back to that if the server doesn't have occlusion enabled, can be disabled with BasePlayer.allowRelationshipServerOcclusion
Move UpdateContacts in RelationshipManager to a PersistentObjectWorkQueue, budgeted to 0.05ms by default (BasePlayer.relationshipUpdateQueueFrameBudgetMs)
This used to iterate over every player on the server every 1s so would scale poorly, will now gradually update relationships over time
Merge from botcollider_optim
Replace ServerUpdateBots with a PersistentObjectWorkQueue
In a test of 500 bots on the server (about baseline on an empty server) this was taking 0.25ms because it looped over every entity, every frame. The internal logic is time gated so it would only actually check/modify 5-15 each frame
WorkQueue is budgeted at 0.05ms and goes through as many as possible in a frame within that window
As this might result in some bot colliders temporarily being the wrong size for a frame or two I've added manual forced collider size updates when a player state changes that we are otherwise checking in the update process (mounting/dismounting/wounding/crawling) to minimise any delays
Don't do any processing for UpdateReputations if the player's reputation state hasn't changed
Readd nextPlayerCheck to JunkpileWater, we don't need to be running this check every frame on every junkpile
Adjust TOD headless check to work via compiler defines, it seems liike cameras are still present on the server (although not doing anything) so it thought it was running on the client
Should save 0.1ms a frame
Marked FishSwarm as client only, was profiling as 0ms but it was still running a coroutine so might as well nuke it on the server
Merge from main
Only conflict is cake.entity, auto resolved
Remove SimpleFloatingEntity and associated prefabs, they were never used
Magnet crane can now sleep
Seems to take a couple of tries to actually settle once a player dismounts
Had to add some box colliders to replace the wheels otherwise the crane would sink into the ground once the wheels were disabled
The one magnet crane on the map was taking 0.28ms each fixed update even when not in use and was the slowest part of the fixed update, now takes 0.06ms once sleeping
Merge from farm_plant_respawn_fix
Reduce underwater_drag_budget_ms default to 0.05 (was 0.1)
Disable nav mesh obstacle carving on LootContainers spawned in the deep sea (can be controlled with debug.disableLootNavObstaclesInDeepSea convar)
Strip all NavMeshObstacles on floating cities
JunkpileWaterWorkQueue frame budget now defaults to 0.05ms (was 0.25)
▆▉▇▇ ▌▊▄█▆ ▌▍█▊▊▇ ▌▍▇▌▄█▄ ▋▅▇▋▉ ▅▄▍
Merge from nav_optimisation
Bump radius to 200m just to be safe
Move the player check up to ScientistNP2 and disable the FSM as well
Don't run LimitedTurnNavAgent if there are no players within 150m
Check every 5s
Static planter boxes in the deep sea (farm barge) spawn their plants ripe and will respawn them every 2 minutes
Fix casino npc not hooked up to vending machine
S2P all floating cities
Adjust scale of deep sea ghost ship markers
Fixed warning spam on space LR
Merge from lr_canvas_rework
Hooked up low ammo and burst indicators
First pass on overhauling the space LR readout to work with regular renderers and not canvases as canvas world space rendering completely breaks down at world edges and in the deep sea
Baked out a texture for the LCD font, made a material and quad per digit
Wrap the bag parenting logic behind a convar that's on by default just in case (debug.bag_respawn_parenting) as it's a little risky
When respawning on a sleeping bag that is parented to a player boat, parent the player to the boat immediately on spawning instead of waiting for the parenting volume to pick it up
Hopefully fixes cases of getting stuck clipping when spawning close to a solid object while the boat is in motion
Sail canvas collider now ignores player movement, prevents players geting stuck
Switch the boat planner material to Rust Standard/Cloth, fixes wacky motion blur
Add a death screen icon for the new scientist
Merge from main (will need fixes)
Clamp the cannon pitch and yaw to zero on the client as the camera eye controller was still being run and rotating around even though we couldn't see it since the cannon takes over the camera
Fixes the player spinning around when dismounting the cannon