Paintings: Tweak selectionboxes

Wuzzy 2020-05-21 04:44:14 +02:00
parent 3bd160f414
commit d2cacf285d

@ -105,19 +105,22 @@ local set_entity = function(object)
..xsize..","..ysize..", motive number "..ent._motive.."!") ..xsize..","..ysize..", motive number "..ent._motive.."!")
return return
end end
if wallm == 4 or wallm == 5 then local box
object:set_properties({ if wallm == 2 then
selectionbox = { exmin, eymin, -1/64, exmax, eymax, 1/64 }, box = { -3/128, eymin, exmin, 1/64, eymax, exmax }
visual_size = visual_size, elseif wallm == 3 then
textures = { wood, wood, wood, wood, painting, wood }, box = { -1/64, eymin, exmin, 3/128, eymax, exmax }
}) elseif wallm == 4 then
else box = { exmin, eymin, -3/128, exmax, eymax, 1/64 }
object:set_properties({ elseif wallm == 5 then
selectionbox = { -1/64, eymin, exmin, 1/64, eymax, exmax }, box = { exmin, eymin, -1/64, exmax, eymax, 3/128 }
visual_size = visual_size,
textures = { wood, wood, wood, wood, painting, wood },
})
end end
object:set_properties({
selectionbox = box,
visual_size = visual_size,
textures = { wood, wood, wood, wood, painting, wood },
})
local dir = minetest.wallmounted_to_dir(wallm) local dir = minetest.wallmounted_to_dir(wallm)
if not dir then if not dir then
return return