implement skinned 1st person view hand

This commit is contained in:
Alexander Weber
2022-02-15 18:57:14 +01:00
committed by bell07
parent da820d06cb
commit 2e39651821
7 changed files with 53 additions and 1 deletions

View File

@ -48,8 +48,12 @@ for _, fn in pairs(skins_dir_list) do
skin_obj:set_meta("playername", playername)
end
local file = io.open(skins.modpath.."/textures/"..fn, "r")
skin_obj:set_meta("format", skins.get_skin_format(file))
local skin_format = skins.get_skin_format(file)
skin_obj:set_meta("format", skin_format)
file:close()
if skin_format == "1.0" then
skin_obj:set_hand_from_texture()
end
file = io.open(skins.modpath.."/meta/"..name..".txt", "r")
if file then
local data = string.split(file:read("*all"), "\n", 3)