mirror of
https://github.com/luanti-org/minetest_game.git
synced 2025-05-29 18:16:27 -04:00
Tall fences
This commit is contained in:
parent
cdabf00df7
commit
661c130bc7
1 changed files with 21 additions and 0 deletions
|
@ -273,6 +273,7 @@ end
|
|||
--
|
||||
-- Fence registration helper
|
||||
--
|
||||
local fence_collision_extra = minetest.settings:get_bool("enable_fence_tall") and 3/8 or 0
|
||||
|
||||
function default.register_fence(name, def)
|
||||
minetest.register_craft({
|
||||
|
@ -303,6 +304,16 @@ function default.register_fence(name, def)
|
|||
connect_right = {{1/8,3/16,-1/16,1/2,5/16,1/16},
|
||||
{1/8,-5/16,-1/16,1/2,-3/16,1/16}},
|
||||
},
|
||||
collision_box = {
|
||||
type = "connected",
|
||||
fixed = {-1/8, -1/2, -1/8, 1/8, 1/2 + fence_collision_extra, 1/8},
|
||||
-- connect_top =
|
||||
-- connect_bottom =
|
||||
connect_front = {-1/8,-1/2,-1/2,1/8,1/2 + fence_collision_extra,-1/8},
|
||||
connect_left = {-1/2,-1/2,-1/8,-1/8,1/2 + fence_collision_extra,1/8},
|
||||
connect_back = {-1/8,-1/2,1/8,1/8,1/2 + fence_collision_extra,1/2},
|
||||
connect_right = {1/8,-1/2,-1/8,1/2,1/2 + fence_collision_extra,1/8},
|
||||
},
|
||||
connects_to = {"group:fence", "group:wood", "group:tree", "group:wall"},
|
||||
inventory_image = fence_texture,
|
||||
wield_image = fence_texture,
|
||||
|
@ -368,6 +379,16 @@ function default.register_fence_rail(name, def)
|
|||
{1/16, 3/16, -1/16, 1/2, 5/16, 1/16},
|
||||
{1/16, -5/16, -1/16, 1/2, -3/16, 1/16}},
|
||||
},
|
||||
collision_box = {
|
||||
type = "connected",
|
||||
fixed = {-1/8, -1/2, -1/8, 1/8, 1/2 + fence_collision_extra, 1/8},
|
||||
-- connect_top =
|
||||
-- connect_bottom =
|
||||
connect_front = {-1/8,-1/2,-1/2,1/8,1/2 + fence_collision_extra,-1/8},
|
||||
connect_left = {-1/2,-1/2,-1/8,-1/8,1/2 + fence_collision_extra,1/8},
|
||||
connect_back = {-1/8,-1/2,1/8,1/8,1/2 + fence_collision_extra,1/2},
|
||||
connect_right = {1/8,-1/2,-1/8,1/2,1/2 + fence_collision_extra,1/8},
|
||||
},
|
||||
connects_to = {"group:fence", "group:wall"},
|
||||
inventory_image = fence_rail_texture,
|
||||
wield_image = fence_rail_texture,
|
||||
|
|
Loading…
Add table
Reference in a new issue