mirror of
https://github.com/sys4-fr/server-nalc.git
synced 2024-12-25 18:20:36 +01:00
fix itemdrop crash
This commit is contained in:
parent
6220cbb027
commit
c250e19ab2
@ -16,11 +16,9 @@ end)
|
|||||||
|
|
||||||
minetest.register_on_leaveplayer(function(player)
|
minetest.register_on_leaveplayer(function(player)
|
||||||
local player_name = player:get_player_name()
|
local player_name = player:get_player_name()
|
||||||
minetest.after(3, function()
|
|
||||||
die_time[player_name] = nil
|
die_time[player_name] = nil
|
||||||
die_respawned[player_name] = nil
|
die_respawned[player_name] = nil
|
||||||
end)
|
end)
|
||||||
end)
|
|
||||||
|
|
||||||
minetest.register_on_dieplayer(function(player)
|
minetest.register_on_dieplayer(function(player)
|
||||||
local player_name = player:get_player_name()
|
local player_name = player:get_player_name()
|
||||||
@ -70,7 +68,7 @@ local function tick()
|
|||||||
local tstamp = minetest.get_us_time()
|
local tstamp = minetest.get_us_time()
|
||||||
for _,player in ipairs(minetest.get_connected_players()) do
|
for _,player in ipairs(minetest.get_connected_players()) do
|
||||||
local player_name = player:get_player_name()
|
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
|
if player:get_hp() > 0 or not enable_damage then
|
||||||
local pos = player:getpos()
|
local pos = player:getpos()
|
||||||
pos.y = pos.y + player_half_height
|
pos.y = pos.y + player_half_height
|
||||||
|
Loading…
Reference in New Issue
Block a user