Skip to content

Commit

Permalink
Fix barriers not fully removing
Browse files Browse the repository at this point in the history
  • Loading branch information
LoneWolfHT committed Feb 23, 2025
1 parent ceb1b05 commit a209df3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mods/ctf/ctf_map/map_functions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ function ctf_map.remove_barrier(mapmeta, callback)

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

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

interval = interval + 0.5
pos1.y = pos1.y + 10
end

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

0 comments on commit a209df3

Please sign in to comment.