From 3fde7f1b4a5937f80a41bca2f76745cbd31bff9d Mon Sep 17 00:00:00 2001 From: JoKeRZH429 <83122870+JoKeRZH429@users.noreply.github.com> Date: Mon, 17 Aug 2026 21:34:25 +0500 Subject: [PATCH] bugfix: exclude observers from roster type computation --- GenOnlineService/Database/Database.MatchHistory.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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)) {