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

TNT: Add missing 'then' #1184

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 2 additions & 3 deletions mods/tnt/init.lua
@@ -1,7 +1,8 @@
tnt = {}

-- Default to enabled when in singleplayer
local enable_tnt = minetest.setting_getbool("enable_tnt")
if enable_tnt == nil
if enable_tnt == nil then
enable_tnt = minetest.is_singleplayer()
end

Expand Down Expand Up @@ -82,7 +83,6 @@ local function add_drop(drops, item)
end
end


local function destroy(drops, npos, cid, c_air, c_fire, on_blast_queue, ignore_protection, ignore_on_blast)
if not ignore_protection and minetest.is_protected(npos, "") then
return cid
Expand All @@ -106,7 +106,6 @@ local function destroy(drops, npos, cid, c_air, c_fire, on_blast_queue, ignore_p
end
end


local function calc_velocity(pos1, pos2, old_vel, power)
-- Avoid errors caused by a vector of zero length
if vector.equals(pos1, pos2) then
Expand Down