Tested PVP inside and outside protected - passed as expected

Tested PvsM inside and outside protected - passed as expected
This commit is contained in:
Sirrobzeroone 2020-12-19 13:23:17 +11:00 committed by Buckaroo Banzai
parent 6242cebb20
commit d515480370

@ -395,7 +395,10 @@ if armor.config.punch_damage == true then
minetest.register_on_punchplayer(function(player, hitter, minetest.register_on_punchplayer(function(player, hitter,
time_from_last_punch, tool_capabilities) time_from_last_punch, tool_capabilities)
local name = player:get_player_name() local name = player:get_player_name()
if name then local name2 = hitter:get_player_name()
if name and name2 and minetest.is_protected(player:get_pos(), "") then
return
elseif name then
armor:punch(player, hitter, time_from_last_punch, tool_capabilities) armor:punch(player, hitter, time_from_last_punch, tool_capabilities)
last_punch_time[name] = minetest.get_gametime() last_punch_time[name] = minetest.get_gametime()
end end