mirror of
https://git.minetest.land/MineClone2/MineClone2.git
synced 2024-12-29 12:47:30 +01:00
Fix crash in wieldview
This commit is contained in:
parent
83b9cf3ad2
commit
1d587b8895
@ -70,6 +70,10 @@ minetest.register_on_joinplayer(function(player)
|
||||
local name = player:get_player_name()
|
||||
wieldview.wielded_item[name] = ""
|
||||
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)
|
||||
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))
|
||||
|
Loading…
Reference in New Issue
Block a user