diff options
author | ubq323 <ubq323@ubq323.website> | 2023-02-06 12:26:15 +0000 |
---|---|---|
committer | ubq323 <ubq323@ubq323.website> | 2023-02-06 12:26:15 +0000 |
commit | 820335d1e930e354f300610b653907ed6f70150a (patch) | |
tree | 67b95ef389e1090149b3ff2242a0db0006731ff1 /client | |
parent | 0d86a5cf4b84e03af518d4b8dceb2385672032a8 (diff) |
actually removing chunks inside of iter_chunks in fine
Diffstat (limited to 'client')
-rw-r--r-- | client/main.lua | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/client/main.lua b/client/main.lua index 63c2fc7..d6f9e60 100644 --- a/client/main.lua +++ b/client/main.lua @@ -123,14 +123,10 @@ function love.update(dt) for cp in map:iter_chunks() do local d = player_cp:orth_dist(cp) if d > 1 then - table.insert(to_remove,cp) + map:remove_chunk(cp) end end - for _,cp in ipairs(to_remove) do - map:remove_chunk(cp) - end - - + end |