Fix bounties being shown to the same team on join (#865)
* Fix bounties being shown to the same team on join * Fix submodules
This commit is contained in:
parent
0df01b9308
commit
c8612a69e4
1 changed files with 6 additions and 5 deletions
|
@ -2,7 +2,11 @@ local bountied_player = nil
|
||||||
local bounty_score = 0
|
local bounty_score = 0
|
||||||
|
|
||||||
local function announce(name)
|
local function announce(name)
|
||||||
local tcolor = ctf_colors.get_color(ctf.player(bountied_player))
|
local bountied = ctf.player(bountied_player)
|
||||||
|
if ctf.player(name).team == bountied.team then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
local tcolor = ctf_colors.get_color(bountied)
|
||||||
minetest.chat_send_player(name,
|
minetest.chat_send_player(name,
|
||||||
minetest.colorize("#fff326", "The next person to kill ") ..
|
minetest.colorize("#fff326", "The next person to kill ") ..
|
||||||
minetest.colorize(tcolor.css, bountied_player) ..
|
minetest.colorize(tcolor.css, bountied_player) ..
|
||||||
|
@ -14,10 +18,7 @@ end
|
||||||
local function announce_all()
|
local function announce_all()
|
||||||
if bountied_player then
|
if bountied_player then
|
||||||
for _, player in pairs(minetest.get_connected_players()) do
|
for _, player in pairs(minetest.get_connected_players()) do
|
||||||
local pname = player:get_player_name()
|
announce(player:get_player_name())
|
||||||
if ctf.player(pname).team ~= ctf.player(bountied_player).team then
|
|
||||||
announce(pname)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue