Skip to content

Commit

Permalink
Fix profile antag count (#30)
Browse files Browse the repository at this point in the history
  • Loading branch information
SaphireLattice authored Aug 21, 2024
1 parent 47ba323 commit 87734bb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ReplayBrowser/Helpers/ReplayHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ public async Task<List<ReplayResult>> GetMostRecentReplays(AuthenticationState s
var replayPlayerGroup = replayPlayers.GroupBy(rp => rp.ReplayId);

var totalRoundsPlayed = replayPlayerGroup.Count();
var totalAntagRoundsPlayed = replayPlayerGroup.Select(rpg => rpg.Any(rp => rp.AntagPrototypes.Count > 0)).Count();
var totalAntagRoundsPlayed = replayPlayerGroup.Count(rpg => rpg.Any(rp => rp.AntagPrototypes.Count > 0));

// Estimated
var totalPlaytime = new TimeSpan(replayPlayerGroup.Sum(rpg => (TimeSpan.TryParse(rpg.First().Duration, out var durationSpan) ? durationSpan : TimeSpan.Zero).Ticks));
Expand Down

0 comments on commit 87734bb

Please sign in to comment.