Allow friendly fire if you're killing yourself

master
rubenwardy 2016-04-05 23:18:08 +01:00
parent f3d2dc934a
commit f3379d0dfd
1 changed files with 1 additions and 1 deletions

View File

@ -452,7 +452,7 @@ minetest.register_on_punchplayer(function(player, hitter,
return
end
if to.team == from.team and to.team ~= "" and to.team ~= nil then
if to.team == from.team and to.team ~= "" and to.team ~= nil and to.name ~= from.name then
minetest.chat_send_player(hitter:get_player_name(), player:get_player_name() .. " is on your team!")
if not ctf.setting("friendly_fire") then
return true