Merge branch 'master' into chat-command-builder

This commit is contained in:
AFCMS 2021-04-06 16:01:38 +02:00
commit 163aa720c2
1 changed files with 4 additions and 0 deletions

View File

@ -70,6 +70,10 @@ minetest.register_on_joinplayer(function(player)
local name = player:get_player_name() local name = player:get_player_name()
wieldview.wielded_item[name] = "" wieldview.wielded_item[name] = ""
minetest.after(0, function(player) minetest.after(0, function(player)
-- if the player left :is_player() will return nil
if not player:is_player() then
return
end
wieldview:update_wielded_item(player) wieldview:update_wielded_item(player)
local itementity = minetest.add_entity(player:get_pos(), "wieldview:wieldnode") local itementity = minetest.add_entity(player:get_pos(), "wieldview:wieldnode")
itementity:set_attach(player, "Hand_Right", vector.new(0, 1, 0), vector.new(90, 0, 45)) itementity:set_attach(player, "Hand_Right", vector.new(0, 1, 0), vector.new(90, 0, 45))