summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorubq323 <ubq323@ubq323.website>2023-02-06 12:26:15 +0000
committerubq323 <ubq323@ubq323.website>2023-02-06 12:26:15 +0000
commit820335d1e930e354f300610b653907ed6f70150a (patch)
tree67b95ef389e1090149b3ff2242a0db0006731ff1
parent0d86a5cf4b84e03af518d4b8dceb2385672032a8 (diff)
actually removing chunks inside of iter_chunks in fine
-rw-r--r--client/main.lua8
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