Fix 3rd-player lobby ready-up and board shape fallback
3rd-player ready-up (two root causes): - Server: LobbyReadyStatusPush to additional players was deserialized without PropertyNameCaseInsensitive, so after the 3rd player readied (converting JSON to camelCase) all subsequent pushes went to Guid.Empty → 3rd player never received ready/start notifications - Client: ready_status push handler treated all non-hosts as "guest", so i_am_ready was incorrectly set from guestReady for additional players → their ready state was clobbered every time host/guest readied - Server: JoinCustomLobbyResponse now includes IsAdditionalPlayer flag so the client can correctly distinguish guest from 3rd+ player Board shape fallback: - GameEngine.cs 2-player overload and GameReadyHandler N-player path both now treat "Default"/null BoardShape as AutoShape(playerCount) rather than hardcoded "Rectangle", fixing old sessions and ranked matches Generated with [Claude Code](https://claude.ai/code) via [Happy](https://happy.engineering) Co-Authored-By: Claude <noreply@anthropic.com> Co-Authored-By: Happy <yesreply@happy.engineering>
This commit is contained in:
@@ -129,7 +129,9 @@ internal sealed class GameLobbyReadyHandler : GameHandlerBase, IMessageHandler
|
||||
pushTasks.Add(_clientPush.PushAsync(lobby.GuestAccountId.Value.ToString(), readyPush, ct));
|
||||
if (lobby.AdditionalPlayersJson != null)
|
||||
{
|
||||
var addlPush = JsonSerializer.Deserialize<List<AdditionalLobbyPlayer>>(lobby.AdditionalPlayersJson);
|
||||
var addlPush = JsonSerializer.Deserialize<List<AdditionalLobbyPlayer>>(
|
||||
lobby.AdditionalPlayersJson,
|
||||
new JsonSerializerOptions { PropertyNameCaseInsensitive = true });
|
||||
if (addlPush != null)
|
||||
foreach (var ap in addlPush)
|
||||
pushTasks.Add(_clientPush.PushAsync(ap.AccountId.ToString(), readyPush, ct));
|
||||
|
||||
Reference in New Issue
Block a user