Compare commits

..

No commits in common. "083d8319eb941c5a510b170258e17a54e3128af0" and "92b4b99083293c45aa026ee19435be624f9c03f7" have entirely different histories.

2 changed files with 3 additions and 12 deletions

View File

@ -207,9 +207,10 @@ function sharedstate.commit()
-- }
-- send_queue[key]=t
-- end
pings.sharedstate_recv_table(state_queue)
sharedstate.clear()
pings.sharedstate_unpack(state_queue)
state_queue={}
end
--- Clear a value from the shared state queue

View File

@ -4,10 +4,6 @@
timers={}
do
local timers = {}
--- Wait
--Wait a certain number of ticks and execute a function.
---@param ticks integer Number of ticks to wait
---@param next function Callback to run
function wait(ticks,next)
table.insert(timers, {t=world.getTime()+ticks,n=next})
end
@ -28,12 +24,6 @@ timers.wait=wait
-- if timer is armed twice before expiring it will only be called once) --
do
local timers = {}
--- Wait
--Wait a certain number of ticks and execute a function. Store the timer with a name so that
--it can be overwritten.
---@param ticks integer Number of ticks to wait
---@param next function Callback to run
---@param name function Name of callback
function namedWait(ticks, next, name)
-- main difference, this will overwrite an existing timer with
-- the same name