mirror of
https://git.minetest.land/MineClone2/MineClone2.git
synced 2024-12-26 19:27:31 +01:00
Merge pull request 'Fixed a crash' (#4154) from fix_capes_crash into master
Reviewed-on: https://git.minetest.land/MineClone2/MineClone2/pulls/4154 Reviewed-by: chmodsayshello <chmodsayshello@hotmail.com>
This commit is contained in:
commit
a2a38b7b3d
@ -163,6 +163,8 @@ function mcl_skins.update_player_skin(player)
|
|||||||
local skin = mcl_skins.player_skins[player]
|
local skin = mcl_skins.player_skins[player]
|
||||||
local skinval = mcl_skins.compile_skin(skin)
|
local skinval = mcl_skins.compile_skin(skin)
|
||||||
|
|
||||||
|
if not skin.cape then skin.cape = "blank.png" end
|
||||||
|
|
||||||
if player:get_inventory():get_stack("armor", 3):get_name() == "mcl_armor:elytra" then
|
if player:get_inventory():get_stack("armor", 3):get_name() == "mcl_armor:elytra" then
|
||||||
skinval = skinval:gsub("%^" .. skin.cape, "")
|
skinval = skinval:gsub("%^" .. skin.cape, "")
|
||||||
-- don't render the "normal" cape on players while wearing the elytra.
|
-- don't render the "normal" cape on players while wearing the elytra.
|
||||||
|
Loading…
Reference in New Issue
Block a user