Merge pull request 'Fix displaying model element on MT 5.4' (#2662) from skins into master

Reviewed-on: https://git.minetest.land/MineClone2/MineClone2/pulls/2662
Reviewed-by: cora <cora@noreply.git.minetest.land>
This commit is contained in:
cora 2022-09-16 16:09:38 +00:00
commit 5a5b83399c

View File

@ -213,7 +213,7 @@ function mcl_skins.show_formspec(player, active_tab, page_num)
formspec = formspec .. formspec = formspec ..
"model[10,0.3;3,7;player_mesh;" .. mesh .. ";" .. "model[10,0.3;3,7;player_mesh;" .. mesh .. ";" ..
mcl_skins.compile_skin(skin) .. mcl_skins.compile_skin(skin) ..
",blank.png,blank.png;0,180;false;true;0,0;0]" ",blank.png,blank.png;0,180;false;true;0,0]"
if active_tab == "skin" then if active_tab == "skin" then
local page_start = (page_num - 1) * 8 - 1 local page_start = (page_num - 1) * 8 - 1
@ -222,7 +222,7 @@ function mcl_skins.show_formspec(player, active_tab, page_num)
"style_type[button;bgcolor=#00000000]" "style_type[button;bgcolor=#00000000]"
local skin = table.copy(skin) local skin = table.copy(skin)
skin_id = skin.simple_skins_id or -1 local skin_id = skin.simple_skins_id or -1
skin.simple_skins_id = nil skin.simple_skins_id = nil
local skins = table.copy(mcl_skins.simple_skins) local skins = table.copy(mcl_skins.simple_skins)
@ -242,7 +242,7 @@ function mcl_skins.show_formspec(player, active_tab, page_num)
formspec = formspec .. formspec = formspec ..
"model[" .. x .. "," .. y .. ";1.5,3;player_mesh;" .. mesh .. ";" .. "model[" .. x .. "," .. y .. ";1.5,3;player_mesh;" .. mesh .. ";" ..
skin.texture .. skin.texture ..
",blank.png,blank.png;0,180;false;true;0,0;0]" ",blank.png,blank.png;0,180;false;true;0,0]"
if skin_id == i then if skin_id == i then
formspec = formspec .. formspec = formspec ..
@ -261,13 +261,13 @@ function mcl_skins.show_formspec(player, active_tab, page_num)
formspec = formspec .. formspec = formspec ..
"model[4,2;2,3;player_mesh;mcl_armor_character.b3d;" .. "model[4,2;2,3;player_mesh;mcl_armor_character.b3d;" ..
mcl_skins.compile_skin(mcl_skins.steve) .. mcl_skins.compile_skin(mcl_skins.steve) ..
",blank.png,blank.png;0,180;false;true;0,0;0]" .. ",blank.png,blank.png;0,180;false;true;0,0]" ..
"button[4,5.2;2,0.8;steve;" .. S("Select") .. "]" .. "button[4,5.2;2,0.8;steve;" .. S("Select") .. "]" ..
"model[6.5,2;2,3;player_mesh;mcl_armor_character_female.b3d;" .. "model[6.5,2;2,3;player_mesh;mcl_armor_character_female.b3d;" ..
mcl_skins.compile_skin(mcl_skins.alex) .. mcl_skins.compile_skin(mcl_skins.alex) ..
",blank.png,blank.png;0,180;false;true;0,0;0]" .. ",blank.png,blank.png;0,180;false;true;0,0]" ..
"button[6.5,5.2;2,0.8;alex;" .. S("Select") .. "]" "button[6.5,5.2;2,0.8;alex;" .. S("Select") .. "]"
@ -310,7 +310,7 @@ function mcl_skins.show_formspec(player, active_tab, page_num)
"model[" .. x .. "," .. y .. "model[" .. x .. "," .. y ..
";1.5,1.5;" .. mesh .. ";" .. mesh .. ";" .. ";1.5,1.5;" .. mesh .. ";" .. mesh .. ";" ..
preview .. preview ..
";" .. rot_x .. "," .. rot_y .. ";false;false;0,0;0]" ";" .. rot_x .. "," .. rot_y .. ";false;false;0,0]"
if skin[active_tab] == texture then if skin[active_tab] == texture then
formspec = formspec .. formspec = formspec ..