Misc bug/exploit fixes

This commit is contained in:
LoneWolfHT 2020-11-21 08:31:36 -08:00
parent f8800fd043
commit 8f2088b92f
3 changed files with 8 additions and 8 deletions

View file

@ -11,6 +11,10 @@ local COMBAT_TIMEOUT_TIME = 20
minetest.register_on_punchplayer(function(player, hitter,
time_from_last_punch, tool_capabilities, dir, damage)
if player and hitter then
if ctf_respawn_immunity.is_immune(player) or ctf_match.is_in_build_time() then
return
end
local pname = player:get_player_name()
local hname = hitter:get_player_name()
@ -22,10 +26,6 @@ time_from_last_punch, tool_capabilities, dir, damage)
return
end
if ctf_respawn_immunity.is_immune(player) then
return
end
local hp = player:get_hp() - damage
if hp <= 0 then
if potential_cowards[pname] then

View file

@ -1,2 +1,2 @@
name = anticoward
depends = ctf, ctf_classes
depends = ctf, ctf_classes, ctf_match