forked from minetest/minetest_game
Update 'nodeupdate()' to 'check_for_falling()' API
This commit is contained in:
parent
208c9f4901
commit
09a229b412
@ -5,7 +5,7 @@ read_globals = {
|
|||||||
"DIR_DELIM",
|
"DIR_DELIM",
|
||||||
"minetest", "core",
|
"minetest", "core",
|
||||||
"dump",
|
"dump",
|
||||||
"vector", "nodeupdate", "nodeupdate_single",
|
"vector",
|
||||||
"VoxelManip", "VoxelArea",
|
"VoxelManip", "VoxelArea",
|
||||||
"PseudoRandom", "ItemStack",
|
"PseudoRandom", "ItemStack",
|
||||||
}
|
}
|
||||||
|
@ -16,7 +16,7 @@ local function destruct_bed(pos, n)
|
|||||||
if reverse then
|
if reverse then
|
||||||
reverse = not reverse
|
reverse = not reverse
|
||||||
minetest.remove_node(other)
|
minetest.remove_node(other)
|
||||||
nodeupdate(other)
|
minetest.check_for_falling(other)
|
||||||
else
|
else
|
||||||
reverse = not reverse
|
reverse = not reverse
|
||||||
end
|
end
|
||||||
|
@ -356,7 +356,7 @@ minetest.register_abm({
|
|||||||
end
|
end
|
||||||
-- Remove node
|
-- Remove node
|
||||||
minetest.remove_node(pos)
|
minetest.remove_node(pos)
|
||||||
nodeupdate(pos)
|
minetest.check_for_falling(pos)
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -364,7 +364,7 @@ function doors.register(name, def)
|
|||||||
end
|
end
|
||||||
def.after_dig_node = function(pos, node, meta, digger)
|
def.after_dig_node = function(pos, node, meta, digger)
|
||||||
minetest.remove_node({x = pos.x, y = pos.y + 1, z = pos.z})
|
minetest.remove_node({x = pos.x, y = pos.y + 1, z = pos.z})
|
||||||
nodeupdate({x = pos.x, y = pos.y + 1, z = pos.z})
|
minetest.check_for_falling({x = pos.x, y = pos.y + 1, z = pos.z})
|
||||||
end
|
end
|
||||||
def.on_rotate = false
|
def.on_rotate = false
|
||||||
|
|
||||||
|
@ -290,7 +290,7 @@ else -- Fire enabled
|
|||||||
def.on_burn(p)
|
def.on_burn(p)
|
||||||
else
|
else
|
||||||
minetest.remove_node(p)
|
minetest.remove_node(p)
|
||||||
nodeupdate(p)
|
minetest.check_for_falling(p)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
|
@ -332,7 +332,7 @@ local function tnt_explode(pos, radius, ignore_protection, ignore_on_blast)
|
|||||||
vm:update_map()
|
vm:update_map()
|
||||||
vm:update_liquids()
|
vm:update_liquids()
|
||||||
|
|
||||||
-- call nodeupdate for everything within 1.5x blast radius
|
-- call check_single_for_falling for everything within 1.5x blast radius
|
||||||
for y = -radius * 1.5, radius * 1.5 do
|
for y = -radius * 1.5, radius * 1.5 do
|
||||||
for z = -radius * 1.5, radius * 1.5 do
|
for z = -radius * 1.5, radius * 1.5 do
|
||||||
for x = -radius * 1.5, radius * 1.5 do
|
for x = -radius * 1.5, radius * 1.5 do
|
||||||
@ -340,7 +340,7 @@ local function tnt_explode(pos, radius, ignore_protection, ignore_on_blast)
|
|||||||
local s = vector.add(pos, rad)
|
local s = vector.add(pos, rad)
|
||||||
local r = vector.length(rad)
|
local r = vector.length(rad)
|
||||||
if r / radius < 1.4 then
|
if r / radius < 1.4 then
|
||||||
nodeupdate_single(s)
|
minetest.check_single_for_falling(s)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -598,7 +598,7 @@ function tnt.register_tnt(def)
|
|||||||
on_construct = function(pos)
|
on_construct = function(pos)
|
||||||
minetest.sound_play("tnt_ignite", {pos = pos})
|
minetest.sound_play("tnt_ignite", {pos = pos})
|
||||||
minetest.get_node_timer(pos):start(4)
|
minetest.get_node_timer(pos):start(4)
|
||||||
nodeupdate(pos)
|
minetest.check_for_falling(pos)
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user