Disallow killing in lobby(no reward)

master
Lejo1 2020-01-04 15:06:32 +01:00
parent dc023a86b2
commit c658bb6e2c
No known key found for this signature in database
GPG Key ID: 7249ED75EF7EBABC
1 changed files with 3 additions and 0 deletions

View File

@ -77,6 +77,9 @@ minetest.register_on_punchplayer(function(player, hitter, time_from_last_punch,
local name = player:get_player_name()
if player:get_hp() - damage <= 0 and not death[name] then
death[name] = true
if damage <= 0 then
return true
end
local killname = hitter:get_player_name()
if player_lobby[name] == player_lobby[killname] then
for _, func in pairs(subgames.on_kill_player) do