mirror of
https://git.minetest.land/MineClone2/MineClone2.git
synced 2024-12-25 19:02:26 +01:00
Fix #1156
This commit is contained in:
parent
44d3f25767
commit
8f2a588059
@ -369,6 +369,33 @@ mcl_player.player_register_model("mcl_armor_character.b3d", {
|
||||
},
|
||||
})
|
||||
|
||||
mcl_player.player_register_model("mcl_armor_character_female.b3d", {
|
||||
animation_speed = 30,
|
||||
textures = {
|
||||
armor.default_skin..".png",
|
||||
"blank.png",
|
||||
"blank.png",
|
||||
},
|
||||
animations = {
|
||||
stand = {x=0, y=79},
|
||||
lay = {x=162, y=166},
|
||||
walk = {x=168, y=187},
|
||||
mine = {x=189, y=198},
|
||||
walk_mine = {x=200, y=219},
|
||||
sit = {x=81, y=160},
|
||||
sneak_stand = {x=222, y=302},
|
||||
sneak_mine = {x=346, y=365},
|
||||
sneak_walk = {x=304, y=323},
|
||||
sneak_walk_mine = {x=325, y=344},
|
||||
swim_walk = {x=368, y=387},
|
||||
swim_walk_mine = {x=389, y=408},
|
||||
swim_stand = {x=434, y=434},
|
||||
swim_mine = {x=411, y=430},
|
||||
run_walk = {x=440, y=459},
|
||||
run_walk_mine = {x=461, y=480},
|
||||
},
|
||||
})
|
||||
|
||||
-- Register Callbacks
|
||||
|
||||
minetest.register_on_player_receive_fields(function(player, formname, fields)
|
||||
|
@ -62,6 +62,7 @@ while true do
|
||||
mcl_skins.meta[skin] = {
|
||||
name = data and data.name or "",
|
||||
author = data and data.author or "",
|
||||
gender = data and data.gender or "",
|
||||
}
|
||||
|
||||
if id > 0 then
|
||||
@ -93,8 +94,16 @@ mcl_skins.set_player_skin = function(player, skin_id)
|
||||
elseif skin_id == 0 then
|
||||
skin = "character"
|
||||
preview = "player"
|
||||
mcl_player.player_set_model(player, "mcl_armor_character.b3d")
|
||||
else
|
||||
skin = "mcl_skins_character_" .. tostring(skin_id)
|
||||
local meta = mcl_skins.meta[skin]
|
||||
minetest.chat_send_all(meta.gender)
|
||||
if meta.gender == "female" then
|
||||
mcl_player.player_set_model(player, "mcl_armor_character_female.b3d")
|
||||
else
|
||||
mcl_player.player_set_model(player, "mcl_armor_character.b3d")
|
||||
end
|
||||
if mcl_skins.has_preview[skin_id] then
|
||||
preview = "mcl_skins_player_" .. tostring(skin_id)
|
||||
else
|
||||
|
@ -1,2 +1,3 @@
|
||||
name = "Steve",
|
||||
author = "%TEXTURE_PACK_AUTHOR%",
|
||||
gender = "male",
|
||||
|
@ -1,2 +1,3 @@
|
||||
name = "Alex",
|
||||
author = "%TEXTURE_PACK_AUTHOR%",
|
||||
gender = "female",
|
||||
|
Loading…
Reference in New Issue
Block a user