mirror of
https://github.com/minetest/minetest_game.git
synced 2025-06-28 20:56:02 +02:00
Use new VoxelManip cleanup API
This commit is contained in:
@ -41,15 +41,9 @@ end
|
||||
function carts:is_rail(pos, railtype)
|
||||
local node = minetest.get_node(pos).name
|
||||
if node == "ignore" then
|
||||
local vm = minetest.get_voxel_manip()
|
||||
local emin, emax = vm:read_from_map(pos, pos)
|
||||
local area = VoxelArea:new{
|
||||
MinEdge = emin,
|
||||
MaxEdge = emax,
|
||||
}
|
||||
local data = vm:get_data()
|
||||
local vi = area:indexp(pos)
|
||||
node = minetest.get_name_from_content_id(data[vi])
|
||||
-- we really need to know, so load it
|
||||
minetest.load_area(pos)
|
||||
node = minetest.get_node(pos).name
|
||||
end
|
||||
if minetest.get_item_group(node, "rail") == 0 then
|
||||
return false
|
||||
|
Reference in New Issue
Block a user