Announce bounties only to the enemy team (#849)

This commit is contained in:
Lars Müller 2021-04-05 16:41:51 +02:00 committed by GitHub
parent c0f224a5bc
commit 433509bcdd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -14,8 +14,9 @@ end
local function announce_all()
if bountied_player then
for _, player in pairs(minetest.get_connected_players()) do
if bountied_player ~= player:get_player_name() then
announce(player:get_player_name())
local pname = player:get_player_name()
if ctf.player(pname).team ~= ctf.player(bountied_player).team then
announce(pname)
end
end
end