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
|
for k, v in pairs(tbl) do
|
||||||
local_state[k]=v
|
local_state[k]=v
|
||||||
end
|
end
|
||||||
PartsManager.refreshAll()
|
rateLimit(1, PartsManager.refreshAll, "refreshAll")
|
||||||
end
|
end
|
||||||
|
|
||||||
function ping.tPose()
|
function ping.tPose()
|
||||||
@ -603,6 +603,12 @@ do
|
|||||||
end
|
end
|
||||||
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