post-5 regression fix
This commit is contained in:
parent
514e00d40a
commit
6b3dfb364c
12
init.lua
12
init.lua
@ -24,22 +24,22 @@ minetest.register_on_dieplayer(function(player)
|
|||||||
minetest.chat_send_all("RIP " .. player:get_player_name())
|
minetest.chat_send_all("RIP " .. player:get_player_name())
|
||||||
end)
|
end)
|
||||||
|
|
||||||
local function kick_player(player)
|
function hardcore_death:kick_player(player)
|
||||||
|
|
||||||
local playername = player:get_player_name()
|
local playername = player:get_player_name()
|
||||||
|
|
||||||
if hardcore_death.dead[playername] then
|
if hardcore_death.dead[playername] then
|
||||||
minetest.chat_send_all("the ghost of " .. playername .. " says hi")
|
minetest.chat_send_all("the ghost of " .. playername .. " says hi")
|
||||||
minetest.kick_player(playername, playername .. " is dead. make a new avatar to keep playing.")
|
minetest.after(0, function(playername)
|
||||||
|
minetest.kick_player(playername, playername .. " is dead. make a new avatar to keep playing.")
|
||||||
|
end, playername)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
minetest.register_on_respawnplayer(function(player)
|
minetest.register_on_respawnplayer(function(player)
|
||||||
kick_player(player)
|
hardcore_death:kick_player(player)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
minetest.register_on_joinplayer(function(player)
|
minetest.register_on_joinplayer(function(player)
|
||||||
kick_player(player)
|
hardcore_death:kick_player(player)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
hardcore_death:load()
|
hardcore_death:load()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user