Merge branch 'feature/rate_limiter' into feature/aquatic
This commit is contained in:
commit
0d3568e3d4
@ -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
|
||||
|
||||
-- }}}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user