Skip to content

Commit a1af3b7

Browse files
authored
Update bounty_algo.lua: Mean eligible KD is 0.8
1 parent bbd0482 commit a1af3b7

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

mods/ctf/ctf_modebase/bounty_algo.lua

+5-5
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ function ctf_modebase.bounty_algo.kd.get_next_bounty(team_members)
66
local recent = ctf_modebase:get_current_mode().recent_rankings.players()
77

88
for _, pname in ipairs(team_members) do
9-
local kd = 0.1
109
if recent[pname] then
11-
kd = math.max(kd, (recent[pname].kills or 0) / (recent[pname].deaths or 1))
10+
local kd = (recent[pname].kills or 0) / (recent[pname].deaths or 1)
11+
if kd >= 0.8 then
12+
table.insert(kd_list, kd)
13+
sum = sum + kd
14+
end
1215
end
13-
14-
table.insert(kd_list, kd)
15-
sum = sum + kd
1616
end
1717

1818
local random = math.random() * sum

0 commit comments

Comments
 (0)