You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the current implementation in Utility.cs, the map result event is created as follows:
var mapResultEvent = new MapResultEvent
{
MatchId = liveMatchId,
MapNumber = currentMapNumber,
Winner = new Winner(
t1score > t2score && reverseTeamSides["CT"] == matchzyTeam1 ? "3" : "2",
team1SeriesScore > team2SeriesScore ? "team1" : "team2"),
StatsTeam1 = new MatchZyStatsTeam(matchzyTeam1.id, matchzyTeam1.teamName, team1SeriesScore, t1score, 0, 0, new List<StatsPlayer>()),
StatsTeam2 = new MatchZyStatsTeam(matchzyTeam2.id, matchzyTeam2.teamName, team2SeriesScore, t2score, 0, 0, new List<StatsPlayer>())
};
Issue:
The logic for determining the winning team erroneously compares the series score (team1SeriesScore vs. team2SeriesScore) instead of the current map score (t1score vs. t2score). This leads to situations where, for example, in Map 2 — even when the map score is 9:7 in favor of team1 — the winner is determined based on the series score (where both team1SeriesScore and team2SeriesScore are 1, causing the condition to select team2).
Examples of the incorrect event (map2) received: Map 1:
Modify the code so that the winner is determined by comparing the current map score (t1score and t2score) instead of the series score. The corrected code should be:
var mapResultEvent = new MapResultEvent
{
MatchId = liveMatchId,
MapNumber = currentMapNumber,
Winner = new Winner(
t1score > t2score && reverseTeamSides["CT"] == matchzyTeam1 ? "3" : "2",
t1score > t2score ? "team1" : "team2"),
StatsTeam1 = new MatchZyStatsTeam(matchzyTeam1.id, matchzyTeam1.teamName, team1SeriesScore, t1score, 0, 0, new List<StatsPlayer>()),
StatsTeam2 = new MatchZyStatsTeam(matchzyTeam2.id, matchzyTeam2.teamName, team2SeriesScore, t2score, 0, 0, new List<StatsPlayer>())
};
The text was updated successfully, but these errors were encountered:
Cherno-Beliy
changed the title
[BUG] Fix the Map Winner Logic in BO3 (to avoid confusing the map score with the series score)
[BUG] Fix the Map Winner Logic in event of BO3 Match (to avoid confusing the map score with the series score)
Mar 8, 2025
In the current implementation in Utility.cs, the map result event is created as follows:
Issue:
The logic for determining the winning team erroneously compares the series score (team1SeriesScore vs. team2SeriesScore) instead of the current map score (t1score vs. t2score). This leads to situations where, for example, in Map 2 — even when the map score is 9:7 in favor of team1 — the winner is determined based on the series score (where both team1SeriesScore and team2SeriesScore are 1, causing the condition to select team2).
Examples of the incorrect event (map2) received:
Map 1:
Map 2:
Map 3:
Solution:
Modify the code so that the winner is determined by comparing the current map score (t1score and t2score) instead of the series score. The corrected code should be:
With this change, the winner of the map will be correctly determined based on the map’s own score (t1score and t2score), eliminating the confusion between the result of an individual map and the overall series score.
A little more about this problem - https://discord.com/channels/1169549878490304574/1169551809237491762/1347209089406734478
The text was updated successfully, but these errors were encountered: