Do not pick items if the player has no interact

This commit is contained in:
Hybrid Dog 2017-09-11 14:08:01 +02:00
parent 06c1212d5b
commit 1e2287a672
1 changed files with 2 additions and 0 deletions

View File

@ -121,8 +121,10 @@ if minetest.settings:get_bool("item_drop.enable_item_pickup") ~= false then
return keys_pressed ~= key_invert
end
-- this function is called for each player to possibly collect items
local function pickupfunc(player)
if not keys_pressed(player)
or not minetest.get_player_privs(player:get_player_name()).interact
or player:get_hp() <= 0 then
return
end