ctf_bounties: Prevent the previous target from being selected again (#531)
This commit is contained in:
parent
23e8cff2d3
commit
badce26ed5
1 changed files with 2 additions and 3 deletions
|
@ -60,7 +60,7 @@ local function bounty_find_new_target()
|
||||||
local players = {}
|
local players = {}
|
||||||
for _, player in pairs(minetest.get_connected_players()) do
|
for _, player in pairs(minetest.get_connected_players()) do
|
||||||
local name = player:get_player_name()
|
local name = player:get_player_name()
|
||||||
if ctf_stats.is_pro(name) then
|
if ctf_stats.is_pro(name) and name ~= bountied_player then
|
||||||
table.insert(players, name)
|
table.insert(players, name)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -75,8 +75,7 @@ minetest.after(math.random(500, 1000), bounty_find_new_target)
|
||||||
|
|
||||||
minetest.register_on_joinplayer(function(player)
|
minetest.register_on_joinplayer(function(player)
|
||||||
local name = player:get_player_name()
|
local name = player:get_player_name()
|
||||||
if bountied_player and
|
if bountied_player and bountied_player ~= name then
|
||||||
bountied_player ~= name then
|
|
||||||
announce(name)
|
announce(name)
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|
Loading…
Reference in a new issue