Skip to content

Commit 62fdb1c

Browse files
committed
fix : SQP Player count
- There was a race condition between the startup of the services, and the connection of the players, resulting in some players connecting faster than the SQP service was able to update the player count. This should ensure the currently connected players are all counted.
1 parent 905c209 commit 62fdb1c

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

Assets/Scripts/Matchplay/Server/ServerGameManager.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,9 @@ public async Task StartGameServerAsync(GameInfo startingGameInfo)
9595

9696
m_SynchedServerData.map.OnValueChanged += OnServerChangedMap;
9797
m_SynchedServerData.gameMode.OnValueChanged += OnServerChangedMode;
98+
//Set the count to connected players
99+
m_MultiplayServerQueryService.SetPlayerCount((ushort)NetworkServer.PlayerCount);
100+
98101
}
99102

100103
async Task<MatchmakingResults> GetMatchmakerPayload(int timeout)
@@ -238,4 +241,4 @@ public void Dispose()
238241
NetworkServer?.Dispose();
239242
}
240243
}
241-
}
244+
}

0 commit comments

Comments
 (0)