mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
fix on_block_tick timer
This commit is contained in:
parent
4d53eb97c3
commit
77b4382577
1 changed files with 2 additions and 0 deletions
|
|
@ -9,6 +9,7 @@ block.__perform_ticks = function(delta)
|
|||
for id, entry in pairs(updating_blocks) do
|
||||
entry.timer = entry.timer + delta
|
||||
local steps = math.floor(entry.timer / entry.delta * #entry / 3)
|
||||
steps = math.min(steps, #entry / 3)
|
||||
if steps == 0 then
|
||||
goto continue
|
||||
end
|
||||
|
|
@ -28,6 +29,7 @@ block.__perform_ticks = function(delta)
|
|||
for id, queue in pairs(present_queues) do
|
||||
queue.timer = queue.timer + delta
|
||||
local steps = math.floor(queue.timer / queue.delta * #queue / 3)
|
||||
steps = math.min(steps, #queue / 3)
|
||||
if steps == 0 then
|
||||
goto continue
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue