userFlaviencancel
branchrust_reboot/main/buildingprivilege_cachecancel

14 Commits over 0 Days - Infinitycph!

18 Days Ago
Fixed blocks registering with a 0 net id on the server when placed with the building plan
18 Days Ago
merge from main
19 Days Ago
Comment
19 Days Ago
Fixed regression with player boat privs when using the cache
19 Days Ago
Cleaned up building priv cache vs vis tests
20 Days Ago
Cleanup
20 Days Ago
Reordered the check so bases with no TC are cheaper
20 Days Ago
Convared the vehicle and entity privilege changes under buildingmanager.privilegecache
20 Days Ago
Building privilege tests
20 Days Ago
Legacy shelters, vehicles and boat building stations no longer use Vis queries Same base same spot: GetVehicleBuildingPrivilege 0.34ms -> 0.01ms GetEntityBuildingPrivilege 0.84ms -> ~0
20 Days Ago
Sort the cells oldest first
20 Days Ago
Store each blocks bound centre and net id in the grid so: - blocks out of the query radius are skipped without a dictionary lookup - the age check doesnt read every block from memory Only run HasColliderWithinSphere when the block bounds aren't entirely inside the search sphere Around 0.09ms for GetBuildingPrivilege in that same base, same spot
20 Days Ago
- Skip the bounds check for blocks that aren't older than the current best block - Visit the cell you're standing in first Skips a lot of work when standing in the core or middle of a base
20 Days Ago
Attempt at global building privilege cache, using a simple grid holding all the building blocks + a collider test on the winning block, because triangles and roofs have bounds larger than their colliders Thats enough to remove the Vis Entities call and keep the same precision. Works on the client and the server In a big base, 575 blocks around me: 4.60ms -> ~0.50ms