correct check for fake player

fixes pandorabox-io/pandorabox.io#547
This commit is contained in:
OgelGames 2021-01-14 14:46:06 +11:00
parent d6af7437b2
commit 0b5b18732a

View File

@ -328,8 +328,8 @@ minetest.register_tool("hangglider:hangglider", {
inventory_image = "glider_item.png",
stack_max=1,
on_use = function(itemstack, player)
if not player or (player.is_player and not player:is_player()) then
-- player does not exist or is created from an autometed machine (fake_player)
if not player or player.is_fake_player then
-- player does not exist or is created from an automated machine (fake_player)
return
end
local pos = player:get_pos()