summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcheapie <no-email-for-you@example.com>2017-03-11 15:18:43 -0600
committercheapie <no-email-for-you@example.com>2017-03-11 15:18:43 -0600
commitaf239f2080236bbf93558ab7370d7c217458e292 (patch)
tree6702110119da4002a93f0f3cc33857a4e03581b0
parent7eb44cb285fd576caa68e7d78831e439d6e6db36 (diff)
downloadplayer_textures-af239f2080236bbf93558ab7370d7c217458e292.tar
player_textures-af239f2080236bbf93558ab7370d7c217458e292.tar.gz
player_textures-af239f2080236bbf93558ab7370d7c217458e292.tar.bz2
player_textures-af239f2080236bbf93558ab7370d7c217458e292.tar.xz
player_textures-af239f2080236bbf93558ab7370d7c217458e292.zip
Fix handling of non-standard images and 3d_armor
-rw-r--r--init.lua7
1 files changed, 4 insertions, 3 deletions
diff --git a/init.lua b/init.lua
index 5b61fc9..3bfd191 100644
--- a/init.lua
+++ b/init.lua
@@ -7,16 +7,17 @@ local function pivot(table)
end
local textures = pivot(minetest.get_dir_list(minetest.get_modpath("player_textures")..DIR_DELIM.."textures"))
+local mesh = minetest.get_modpath("3d_armor") and "3d_armor_character.b3d" or "character.b3d"
local function applyskin(player)
local name = player:get_player_name()
if textures[string.format("player_%s.png",name)] then
if minetest.get_modpath("default") then
- default.player_set_textures(player,string.format("[combine:64x32:0,0=player_%s.png",name))
+ default.player_set_textures(player,string.format("player_%s.png",name))
end
- player:set_properties({textures={string.format("[combine:64x32:0,0=player_%s.png",name)}})
+ player:set_properties({textures={string.format("player_%s.png",name)}})
end
- player:set_properties({visual="mesh",visual_scale={x=1,y=1},mesh="character.b3d"})
+ player:set_properties({visual="mesh",visual_scale={x=1,y=1},mesh=mesh})
end
minetest.register_on_joinplayer(function(player)