1
0
mirror of https://github.com/sys4-fr/server-nalc.git synced 2024-12-25 02:00:37 +01:00

fix itemdrop crash

This commit is contained in:
crabman77 2015-11-22 23:45:19 +01:00
parent 6220cbb027
commit c250e19ab2

View File

@ -16,10 +16,8 @@ end)
minetest.register_on_leaveplayer(function(player)
local player_name = player:get_player_name()
minetest.after(3, function()
die_time[player_name] = nil
die_respawned[player_name] = nil
end)
die_time[player_name] = nil
die_respawned[player_name] = nil
end)
minetest.register_on_dieplayer(function(player)
@ -70,7 +68,7 @@ local function tick()
local tstamp = minetest.get_us_time()
for _,player in ipairs(minetest.get_connected_players()) do
local player_name = player:get_player_name()
if die_time[player_name] < 1 then
if die_time[player_name] and die_time[player_name] < 1 then
if player:get_hp() > 0 or not enable_damage then
local pos = player:getpos()
pos.y = pos.y + player_half_height