Merge branch 'feature/rate_limiter' into feature/aquatic

This commit is contained in:
NullBite 2022-03-24 09:04:12 -04:00
commit 0d3568e3d4
Signed by: nullbite
GPG Key ID: 6C4D545385D4925A

View File

@ -540,7 +540,7 @@ function ping.syncState(tbl)
for k, v in pairs(tbl) do
local_state[k]=v
end
PartsManager.refreshAll()
rateLimit(1, PartsManager.refreshAll, "refreshAll")
end
function ping.tPose()
@ -603,6 +603,12 @@ do
end
end
function rateLimit(ticks, next, name)
if cooldown(ticks+1, name) then
namedWait(ticks, next, name)
end
end
-- }}}