Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix non-diagonal borders water detect #1202

Merged
merged 3 commits into from
Aug 12, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Fix non-diagonal borders water detect
Emojigit committed Aug 11, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit 5dff906b0f5e82630004bd1c27d1fbfe1ac949a1
7 changes: 4 additions & 3 deletions mods/ctf/ctf_map/map_functions.lua
Original file line number Diff line number Diff line change
@@ -74,6 +74,7 @@ function ctf_map.remove_barrier(mapmeta, pos2, callback)

-- Shave off ~0.1 seconds from the main loop
minetest.handle_async(function(d, p1, p2, barrier_nodes, t)
local mod = table.copy(d)
local Nx = p2.x - p1.x + 1
local Ny = p2.y - p1.y + 1
local ID_IGNORE = minetest.CONTENT_IGNORE
@@ -107,21 +108,21 @@ function ctf_map.remove_barrier(mapmeta, pos2, callback)
end
end
end
d[vi] = replacement_this
mod[vi] = replacement_this
done = true
break
end
end

-- Avoid changing nodes players placed during async
if not done then
d[vi] = ID_IGNORE
mod[vi] = ID_IGNORE
end
end
end
end

return d
return mod
end, function(d)
vm:set_data(d)
vm:update_liquids()