userIan Hendersoncancel
branchrust_reboot/main/autoturret_improvementscancel

22 Commits over 31 Days - 0.03cph!

13 Days Ago
Fix NRE
13 Days Ago
Fixed turrets idle tick freezing turrets vec aim dir to be (0,1,0) until the first target or player appeared nearby
13 Days Ago
main -> autoturret_improvements
16 Days Ago
Since we are no longer forcing aim direction packets constantly we need to save/load the aim direction as you would expect.
16 Days Ago
Setup new overloads to BaseNetworkable GetConnections methods - this allows us to pass in the existing group of an object and avoid doing an expensive GetGroup() calculation. AutoTurret's will now only run idle tick provided they have a connections nearby. This means auto turrets with no one around wont do their rotations left and right
16 Days Ago
Move auto turret idle calculations back to the server: This was required since target acquisition uses the current angle of the turet and this will need to be synced between the client + server. Having the client do it would result in mismatches.
17 Days Ago
Fixed offline tick (turret pointing up) being overriden on the client by the idle tick Ensure loaded turrets respect their client orientation properly
17 Days Ago
main -> autoturret_improvements
34 Days Ago
- Fixed turret not starting with Vector3.up when offline - still needs a little tweak - Constantly face to correct target - If not being controlled turn off client idle tick
34 Days Ago
Ensure a turned off turret won't try to predict movement on the clientside
34 Days Ago
Run rotate at 10hz rather than 20hz. Run send aim direction at 10hz rather than 20hz. Run look for targets at 5hz rather than 10hz.
34 Days Ago
main -> autoturret_improvements
37 Days Ago
Split Autoturret into multiple work queues: Ammo, Scan, Tick Keep Aiming/Rotating code in the 66hz loop Move TargetAquisition/Thinking/Firing to a 10hz work queue scheduling loop Around a 0.3ms in improvement (in spikes) on idle with 500 turrets.
37 Days Ago
Split off autoturret ammo updating into its own queue
37 Days Ago
No need to sort rays - we are looping over them all anyway I'm sure theres some minor concerns with the relevant collider 'usually' being first, but the loop isnt the expensive bit The scale of the sorting is
37 Days Ago
Minor cleanup
37 Days Ago
More profiling
37 Days Ago
Don't need to check peekers if the target isn't a player. Should save us some cycles
37 Days Ago
main -> autoturret_improvements
40 Days Ago
Fixed turrets not following proper aim direction if it doest have a target (on the server code), so its ready to auto snap when we swap back to the server auth side - Compile fix
40 Days Ago
Dirty aim direction angle changed from 0.03 (it basically never ran) to 1 - Instantly reduced turret snapshots when aiming to a target - Lerped on the client anyway so it doesnt make too much of a difference apart from reducing packets
41 Days Ago
Make the Autoturret idle animation run only on the client. This prevents turrets constantly sending network aim direction update packets constantly even when they have no target or are around no players Saves roughly 20KB/s for our big turret base save