branchrust_reboot/main/trap_optimizecancel

7 Commits over 0 Days - ∞cph!

11 Days Ago
Merge from main -> trap_optimize
11 Days Ago
Add `auto_turret_budget_ms` and `gun_trap_budget_ms` to configure the budgeting (default 0.5ms per frame)
11 Days Ago
.meta file
11 Days Ago
Move AutoTurret to PersistantObjectWorkQueue<> (instead of invokes that requeue each frame) Add `GunTrapScanWorkQueue` to make shotgun traps budgetted to 0.5ms / frame Register turrets & shotgun traps with their budgeted queues when they are spawned & unregister when destroyed
11 Days Ago
Change List<> in PersistantObjectWorkQueue to ListHashset<> (incase many entities in the "queue" cause a slowdown) Iterate with the Array instead of ListHashSet[] because of comment claiming Array[] is 2x faster to iterate than List<> (in mono?)
13 Days Ago
Optimize shotgun traps by using the TC of the shotgun trap instead of the player it is trying to shoot at Cache the TC for 3 seconds in shotgun trap (we still check auth normally)
13 Days Ago
Optimize turrets on the server by caching if there are any un-authed target in range & skip scanning targets if that is the case Mark auth as dirty when players are removed from auth or come into trigger range while unauthed Add Action onto TriggerBase for OnEntityEnterTrigger() and OnEntityLeaveTrigger()