Fix crash with composited textures

This commit is contained in:
stujones11 2017-02-25 22:16:40 +00:00
parent 5bb561603e
commit b0d487312e
1 changed files with 7 additions and 1 deletions

View File

@ -35,7 +35,13 @@ local function connects_to_group(pos, groups)
end
end
local function get_tile_textures(t, facedir)
local function get_tile_textures(tiles, facedir)
local t = table.copy(tiles)
for i, v in pairs(t) do
if type(v) == "table" then
t[i] = v.name or "blank.png"
end
end
local textures = {t[1], t[1], t[1], t[1], t[1], t[1]}
if #t == 3 then
textures = {t[1], t[2], t[3], t[3], t[3], t[3]}