Remove death handling in on_punchplayer

master
upsilon 2019-08-14 12:22:49 +02:00
parent d1d2c5e00f
commit f71f57e2cd
No known key found for this signature in database
GPG Key ID: A80DAE1F266E1C3C
1 changed files with 0 additions and 9 deletions

View File

@ -34,20 +34,11 @@ end)
minetest.register_on_punchplayer(function(player, hitter, time_from_last_punch, tool_capabilities, dir, damage)
local name = player:get_player_name()
local map = hg_map.find_player_map(name)
if not map or map.build_countdown > 0 then
return true
end
-- The following is unnecessary since commit dfc819 by @rubenwardy.
-- It will be removed as soon as a stable version containing this commit
-- is released.
if player:get_hp() - damage <= 0 then
hg_match.killed_player(name, hitter:get_player_name())
-- This makes the call in on_dieplayer to gracefully fail.
end
end)
minetest.register_on_dieplayer(function(player, reason)