From badce26ed52d1cb54349d2436ae6e1a1d28b600d Mon Sep 17 00:00:00 2001 From: ANAND Date: Wed, 18 Dec 2019 11:01:34 +0530 Subject: [PATCH] ctf_bounties: Prevent the previous target from being selected again (#531) --- mods/ctf/ctf_bounties/init.lua | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/mods/ctf/ctf_bounties/init.lua b/mods/ctf/ctf_bounties/init.lua index fbb0028..9a18869 100644 --- a/mods/ctf/ctf_bounties/init.lua +++ b/mods/ctf/ctf_bounties/init.lua @@ -60,7 +60,7 @@ local function bounty_find_new_target() local players = {} for _, player in pairs(minetest.get_connected_players()) do 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) end end @@ -75,8 +75,7 @@ minetest.after(math.random(500, 1000), bounty_find_new_target) minetest.register_on_joinplayer(function(player) local name = player:get_player_name() - if bountied_player and - bountied_player ~= name then + if bountied_player and bountied_player ~= name then announce(name) end end)