mirror of
https://github.com/luanti-org/minetest_game.git
synced 2025-06-01 03:20:03 -04:00
Fix fencegate nodeboxes
This commit is contained in:
parent
1f7ea89cb6
commit
57ecba1823
1 changed files with 27 additions and 8 deletions
|
@ -745,11 +745,7 @@ function doors.register_fencegate(name, def)
|
||||||
minetest.sound_play(node_def.sound, {pos = pos, gain = 0.3,
|
minetest.sound_play(node_def.sound, {pos = pos, gain = 0.3,
|
||||||
max_hear_distance = 8})
|
max_hear_distance = 8})
|
||||||
return itemstack
|
return itemstack
|
||||||
end,
|
end
|
||||||
selection_box = {
|
|
||||||
type = "fixed",
|
|
||||||
fixed = {-1/2, -1/2, -1/4, 1/2, 1/2, 1/4},
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -774,7 +770,19 @@ function doors.register_fencegate(name, def)
|
||||||
fence_closed.sound = "doors_fencegate_open"
|
fence_closed.sound = "doors_fencegate_open"
|
||||||
fence_closed.collision_box = {
|
fence_closed.collision_box = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
fixed = {-1/2, -1/2, -1/4, 1/2, 1/2, 1/4},
|
fixed = {
|
||||||
|
{-5/8, -1/2, -1/8, -3/8, 1/2, 1/8},
|
||||||
|
{-3/8, -1/2, -1/16, 3/8, 5/16, 1/16},
|
||||||
|
{3/8, -1/2, -1/8, 5/8, 1/2, 1/8}
|
||||||
|
},
|
||||||
|
}
|
||||||
|
fence_closed.selection_box = {
|
||||||
|
type = "fixed",
|
||||||
|
fixed = {
|
||||||
|
{-5/8, -1/2, -1/8, -3/8, 1/2, 1/8},
|
||||||
|
{-3/8, -1/2, -1/16, 3/8, 5/16, 1/16},
|
||||||
|
{3/8, -1/2, -1/8, 5/8, 1/2, 1/8}
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
local fence_open = table.copy(fence)
|
local fence_open = table.copy(fence)
|
||||||
|
@ -782,10 +790,21 @@ function doors.register_fencegate(name, def)
|
||||||
fence_open.gate = name .. "_closed"
|
fence_open.gate = name .. "_closed"
|
||||||
fence_open.sound = "doors_fencegate_close"
|
fence_open.sound = "doors_fencegate_close"
|
||||||
fence_open.groups.not_in_creative_inventory = 1
|
fence_open.groups.not_in_creative_inventory = 1
|
||||||
|
fence_open.selection_box = {
|
||||||
|
type = "fixed",
|
||||||
|
fixed = {
|
||||||
|
{-5/8, -1/2, -1/8, -3/8, 1/2, 1/8},
|
||||||
|
{-9/16, -1/2, -14/16, -7/16, 5/16, 0},
|
||||||
|
{3/8, -1/2, -1/8, 5/8, 1/2, 1/8}
|
||||||
|
},
|
||||||
|
}
|
||||||
fence_open.collision_box = {
|
fence_open.collision_box = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
fixed = {{-1/2, -1/2, -1/4, -3/8, 1/2, 1/4},
|
fixed = {
|
||||||
{-1/2, -3/8, -1/2, -3/8, 3/8, 0}},
|
{-5/8, -1/2, -1/8, -3/8, 1/2, 1/8},
|
||||||
|
{-9/16, -1/2, -14/16, -7/16, 5/16, 0},
|
||||||
|
{3/8, -1/2, -1/8, 5/8, 1/2, 1/8}
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
minetest.register_node(":" .. name .. "_closed", fence_closed)
|
minetest.register_node(":" .. name .. "_closed", fence_closed)
|
||||||
|
|
Loading…
Add table
Reference in a new issue