Skip to content

Commit 26379f8

Browse files
committed
Apply team balance improvements
1 parent 3276bac commit 26379f8

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

mods/ctf/ctf_modebase/features.lua

+6-8
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,15 @@ ctf_core.testing = {
1010
local one_third = math.ceil(0.34 * total_players)
1111
local one_fourth = math.ceil(0.25 * total_players)
1212
local avg = (kd_diff + actual_kd_diff) / 2
13+
local pcount_diff_limit = (
14+
(players_diff <= math.min(one_fourth, 2)) or
15+
(pkd >= 1.8 and players_diff <= math.min(one_third, 4))
16+
)
1317
if best_kd.kills + worst_kd.kills >= 30 then
1418
avg = actual_kd_diff
1519
end
16-
return (best_kd.kills + worst_kd.kills >= 30 and best_kd.t == best_players.t) or
17-
(
18-
pkd >= math.min(1, kd_diff/2) and avg >= 0.4 and
19-
(
20-
players_diff <= math.min(one_fourth, 3) or
21-
(pkd >= 1.5 and players_diff <= math.min(one_third, 6))
22-
)
23-
)
20+
return pcount_diff_limit and ((best_kd.kills + worst_kd.kills >= 30 and best_kd.t == best_players.t) or
21+
(pkd >= math.min(1, kd_diff/2) and avg >= 0.4))
2422
end
2523
}
2624

0 commit comments

Comments
 (0)