diff --git a/GenOnlineService/Database/Database.MatchHistory.cs b/GenOnlineService/Database/Database.MatchHistory.cs index aead105..0672868 100644 --- a/GenOnlineService/Database/Database.MatchHistory.cs +++ b/GenOnlineService/Database/Database.MatchHistory.cs @@ -467,7 +467,10 @@ public static async Task CreatePlaceholderMatchHistory( jsonSlots[member.SlotIndex] = JsonSerializer.Serialize(model); // Observers are not active players - if (model.side != Constants.OBSERVER_SIDE_VALUE) + // This function runs at the start of a match, before observers are assigned + // their actual side value. Observers have PLAYERTEMPLATE_RANDOM (-2) at this + // point, so use that value to identify and exclude them. + if (model.side != -2) { if (playersPerTeam.ContainsKey(model.team)) {