All Rust commits from Facepunch
Optimize worst case pass of the multiple exterior detection so it doesn't balloon execution time
Ok fine allow buildings to define multiple exteriors - even though theoretically there can only be a single exterior per base it gets funky in it's current implementation when not all building blocks are handled by base occlusion so you can have separate sections of a base that aren't connected with faces but are both outsides (example: connecting external TC with ramps)
Exclude high walls from room occlusion (since they are always considered outside structures)
Fix bases being able to define multiple outsides of the base - collapse to a single outside when interior rooms incorrectly are flagged as interior
Make remote controlled entities (turrets, drones, cameras) have base occlusion disabled - will enable it for RC entities when we do the push to get rid of the minimum 30m occlusion distance to make it work for anti-ESP, for now lets keep it simple and skip since RC entities are used for <1% of gameplay
500 extra bases from the server save
- add room.exportpastes <folder> to convert a folder of copy paste files (aka the server save) to the test format base occlusion expects - add support for base occlusion tests to work across multiple directories of test files (so we can keep the test bases organized)
Fix refreshing faces being able to go above 1,000 depth, use a queue instead because initializing a large base can go over the limit
Fix unity toolbar extender ui toolkit causing focus as well on domain reload
Fixed the game window grabbing mouse + keyboard focus when running tests - should only show the window, not grab focus
Improve base splitting - filter out external TCs and small structures so it only exports proper bases
Ridable horse prefab 👀
Add ability to copy paste to import entire saves and output a different copy paste for each base
- fix deployables clipping through doors being hidden when an exterior door closes - fix entity destroy message sometimes being sent before network group switch happens (when repartitioning base)
More comments improved
Better comments
Fix compile error (even though it's editor only it still can mess up editor if it switches realms)
Fix formatting of Visibility.cs
merge from main -> base_occlusion
Fix room export tool not writing to the temp directory in the editor
Mark the room exporter (base -> JSON) as editor only - used so we can run tests on bases without having to spawn the entire base (which is slow)
Disable TCs from room occlusion - if you hide the TC from the client then you don't know if your authed on the base - re-enable later once we move auth networking out of the TC itself (we could only network to players authed but then we still need to know if a TC is attached to a building)
Fix line endings
More cleanup
Codegen again
Codegen
Set room occlusion and the admin bypass for it to be saved in editor - avoid us having to keep turning it on & disable the admin bypass every time we enter play mode but keep the feature disabled by default in standalone builds
Add support for convars to only be saved in the editor
merge from main -> base_occlusion
Optimizations - add spatial grid for rooms (just like network grids) so we don't murder performance networking every room within 32m (because we actually testing this large scale now, not craggy) - fix every room being checked on the server instead of only the room that the entity was deleted from
Codegen
Make sure that disabling room occlusion after enabling it cleans everything up - we want all face definitions to be destroyed after disabling so we can re-initalize everything properly - if initialization fails, only try once instead of getting stuck trying every frame
Add base occlusion to runtime profiling so we can monitor how much main thread time it spends on room occlusion per frame
Improve the warning if the spatial network grid IDs will overlap the reserved room ids - change the encoding from hardcoded values to constants (confirmed behavior is identical)
Make room network group IDs static similar to the other reserved values instead of instance field - first 1024 IDs are for global groups - last 6.5M IDs reserved for base occlusion
Cleaned up entity face registeration so only BaseEntity calls RoomOcclusionManager.OnFacesRefreshed(entity) - used to subscribe to both DecayEntity and BuildingBlock so it could work on doors & building blocks - get rid of needing to register all faces explicitly in SaveRestore & copy paste
Update doors to only call into base occlusion when their open/closed state is changed (via flags) instead of needing to remember 3x different places it called into base occlusion
Cleanup network subscription logic so it all happens in a single place
Codegen
merge from main -> base_occlusion
merge from main -> base_occlusion
Refactor and cleanup of code
Make sure we only send entiites when a door opens immediately based on a convar, so we can do normal slower snapshot queue when doors are opened and we send entiites and let the "closer than 30m send everything" prevent pop-in
Fix deployables that are inside multiple rooms not working - assign them to their own network groups similar to walls that share multiple rooms and subscribe appropriately
Always show rooms that are within ~30m of the player - prevents us from having to blast the client with a ton of entities right when they open the door, allows us to stream them at a sane rate
▇ ▉▌▍ ▆▅▆ ▆▇▌▇ ▄▍ ▋▍▅▅▉█▇ ▇▇ ▅▇█▆▅▆ ▉▌▉ ▄▌▆▍▉▉▅ ▆▉▍▊▊▍ ▅█ ▉▍▋▍ ▄▅▍██ ▄▇██ ▍▄ ▍▋█▇▇▅▋ ▋▇▉ ▄▇▌▇▊▊▆▆ ▄▋ ▅█▉▌█▄█▋▌▆ ▄▊
Simple list of doors with transparency for testing
Add ddraw for network groups for rooms
Reduce amount of network groups for rooms
Send network updates of room behind the door before the door's network update is sent