Skip to content

Commit b50fb0e

Browse files
authored
only count balanced custom matches for elo (#2418)
1 parent acae3cf commit b50fb0e

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

ZkData/Ef/WHR/RatingSystems.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,11 @@ private static void FillApplicableRatings(SpringBattle battle, SpringBattleConte
122122
battle.ApplicableRatings = 0;
123123
if (battle.HasBots) return;
124124
if (battle.IsMission) return;
125-
if (battle.SpringBattlePlayers?.Select(x => x.AllyNumber).Distinct().Count() < 2) return;
125+
if (battle.SpringBattlePlayers?.Where(x => !x.IsSpectator).Select(x => x.AllyNumber).Distinct().Count() < 2) return;
126126
if (battle.ResourceByMapResourceID?.MapIsSpecial == true) return;
127+
128+
//only count balanced custom matches for elo
129+
if (battle.Mode == AutohostMode.None && battle.SpringBattlePlayers?.Where(x => !x.IsSpectator).GroupBy(x => x.AllyNumber).Select(x => x.Count()).Distinct().Count() > 1) return;
127130
if (battle.Duration < GlobalConst.MinDurationForElo) return;
128131
battle.ApplicableRatings |= (RatingCategoryFlags)result.LobbyStartContext.ApplicableRating;
129132
//battle.ApplicableRatings |= RatingCategoryFlags.Casual;

0 commit comments

Comments
 (0)