Initialize armor after all on_joinplayer callbacks have run

This commit is contained in:
stujones11 2017-04-16 16:52:12 +01:00
parent 99bc8cf2d3
commit 7566ecccee

@ -138,9 +138,11 @@ end)
minetest.register_on_joinplayer(function(player) minetest.register_on_joinplayer(function(player)
default.player_set_model(player, "3d_armor_character.b3d") default.player_set_model(player, "3d_armor_character.b3d")
if armor:init_player_armor(player) == false then minetest.after(0, function(player)
pending_players[player] = 0 if armor:init_player_armor(player) == false then
end pending_players[player] = 0
end
end, player)
end) end)
minetest.register_on_leaveplayer(function(player) minetest.register_on_leaveplayer(function(player)