mirror of
https://github.com/minetest/minetest_game.git
synced 2025-06-28 12:46:02 +02:00
Add backface_culling to open chests and fencegates
This commit is contained in:
@ -712,7 +712,7 @@ function doors.register_fencegate(name, def)
|
||||
local fence = {
|
||||
description = def.description,
|
||||
drawtype = "mesh",
|
||||
tiles = {def.texture},
|
||||
tiles = {},
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
sunlight_propagates = true,
|
||||
@ -734,6 +734,16 @@ function doors.register_fencegate(name, def)
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
if type(def.texture) == "string" then
|
||||
fence.tiles[1] = {name = def.texture, backface_culling = true}
|
||||
elseif def.texture.backface_culling == nil then
|
||||
fence.tiles[1] = table.copy(def.texture)
|
||||
fence.tiles[1].backface_culling = true
|
||||
else
|
||||
fence.tiles[1] = def.texture
|
||||
end
|
||||
|
||||
if not fence.sounds then
|
||||
fence.sounds = default.node_sound_wood_defaults()
|
||||
end
|
||||
|
Reference in New Issue
Block a user