Fix image file being left open
parent
5cf9afc6a5
commit
838266c392
4
init.lua
4
init.lua
|
@ -1,6 +1,8 @@
|
|||
minetest.register_on_joinplayer(function(player)
|
||||
local filename = minetest.get_modpath("player_textures").."/textures/player_"..player:get_player_name()
|
||||
if io.open(filename..".png") then
|
||||
local f = io.open(filename..".png")
|
||||
if f then
|
||||
f:close()
|
||||
default.player_set_textures(player, {"player_"..player:get_player_name()..".png"})
|
||||
end
|
||||
end)
|
||||
|
|
Loading…
Reference in New Issue