Skip to content

Commit a209df3

Browse files
committed
Fix barriers not fully removing
1 parent ceb1b05 commit a209df3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

mods/ctf/ctf_map/map_functions.lua

+2-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ function ctf_map.remove_barrier(mapmeta, callback)
7171

7272
local interval = 0
7373
while pos2.y < target do
74-
pos1.y = math.min(pos1.y + 10, target-1)
74+
pos1.y = math.min(pos1.y, target-1)
7575
pos2.y = math.min(pos1.y + 10, target)
7676

7777
minetest.after(0 + interval, function(p1, p2)
@@ -106,6 +106,7 @@ function ctf_map.remove_barrier(mapmeta, callback)
106106
end, pos1:copy(), pos2:copy())
107107

108108
interval = interval + 0.5
109+
pos1.y = pos1.y + 10
109110
end
110111

111112
minetest.log("action", "Clearing barriers using mapmeta.barrier_area, will take around "..(interval).." seconds")

0 commit comments

Comments
 (0)