mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-04 15:21:06 +01:00
Fixed a crash
Crash when the cape field is not set. It is not set when joining an old world with the capes PR applied. Also trimmed trailing.
This commit is contained in:
parent
d3c591915f
commit
d1ac98a019
1 changed files with 6 additions and 4 deletions
|
@ -163,6 +163,8 @@ function mcl_skins.update_player_skin(player)
|
|||
local skin = mcl_skins.player_skins[player]
|
||||
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
|
||||
skinval = skinval:gsub("%^" .. skin.cape, "")
|
||||
-- don't render the "normal" cape on players while wearing the elytra.
|
||||
|
|
Loading…
Reference in a new issue