diff --git a/src/CommandFormats.hh b/src/CommandFormats.hh index f7e939a8..776abfd0 100644 --- a/src/CommandFormats.hh +++ b/src/CommandFormats.hh @@ -1551,7 +1551,9 @@ struct SC_SimpleMail_BB_81 { struct S_LobbyListEntry_83 { le_uint32_t menu_id = 0; le_uint32_t item_id = 0; - le_uint32_t unused = 0; + // It appears that Sega's servers sent the number of players in each lobby in + // this field, but the client ignores it. + le_uint32_t player_count = 0; } __packed_ws__(S_LobbyListEntry_83, 0x0C); // 84 (C->S): Choose lobby @@ -4458,8 +4460,10 @@ struct G_WalkToPosition_6x40 { // 6x41: Move to position (v1) // 6x42: Run (protected on V3/V4) -// This subcommand is completely ignored by v2 and later. +// Command 6x41 is completely ignored by v2 and later. // If UDP mode is enabled, this command is sent via UDP. +// TODO: Should newserv translate 6x41 to 6x42? Is there any difference in how +// v1 and pre-v1 handle 6x42 vs. 6x41? struct G_MoveToPosition_6x41_6x42 { G_ClientIDHeader header; diff --git a/src/SendCommands.cc b/src/SendCommands.cc index 952a721b..0e9332c7 100644 --- a/src/SendCommands.cc +++ b/src/SendCommands.cc @@ -1730,7 +1730,7 @@ void send_lobby_list(shared_ptr c) { auto& e = entries.emplace_back(); e.menu_id = MenuID::LOBBY; e.item_id = l->lobby_id; - e.unused = 0; + e.player_count = l->count_clients(); } send_command_vt(c, 0x83, entries.size(), entries); diff --git a/tests/DCNTE-GameSmokeTest.test.txt b/tests/DCNTE-GameSmokeTest.test.txt index 85941b7d..093f6759 100644 --- a/tests/DCNTE-GameSmokeTest.test.txt +++ b/tests/DCNTE-GameSmokeTest.test.txt @@ -649,7 +649,7 @@ I 91446 2023-12-31 21:05:45 - [Commands] Sending to C-4 (version=DC_NTE command= 0000 | 83 0A 7C 00 33 00 00 33 01 00 00 00 00 00 00 00 | | 3 3 0010 | 33 00 00 33 02 00 00 00 00 00 00 00 33 00 00 33 | 3 3 3 3 0020 | 03 00 00 00 00 00 00 00 33 00 00 33 04 00 00 00 | 3 3 -0030 | 00 00 00 00 33 00 00 33 05 00 00 00 00 00 00 00 | 3 3 +0030 | 00 00 00 00 33 00 00 33 05 00 00 00 01 00 00 00 | 3 3 0040 | 33 00 00 33 06 00 00 00 00 00 00 00 33 00 00 33 | 3 3 3 3 0050 | 07 00 00 00 00 00 00 00 33 00 00 33 08 00 00 00 | 3 3 0060 | 00 00 00 00 33 00 00 33 09 00 00 00 00 00 00 00 | 3 3 diff --git a/tests/GC-Episode2PrivateDrops2P.test.txt b/tests/GC-Episode2PrivateDrops2P.test.txt index 1ced3124..e1a53667 100644 --- a/tests/GC-Episode2PrivateDrops2P.test.txt +++ b/tests/GC-Episode2PrivateDrops2P.test.txt @@ -558,7 +558,7 @@ I 94381 2023-12-29 15:36:20 - [Commands] Sending to C-5 (version=GC_V3 command=0 0010 | 00 00 4F 33 00 50 00 44 20 00 00 00 00 00 00 00 | 3 D 0020 | 00 00 00 00 00 00 FF FF 80 FF FF FF | I 94381 2023-12-29 15:36:20 - [Commands] Sending to C-5 (version=GC_V3 command=83 flag=0F) -0000 | 83 0F B8 00 33 00 00 33 01 00 00 00 00 00 00 00 | 3 3 +0000 | 83 0F B8 00 33 00 00 33 01 00 00 00 01 00 00 00 | 3 3 0010 | 33 00 00 33 02 00 00 00 00 00 00 00 33 00 00 33 | 3 3 3 3 0020 | 03 00 00 00 00 00 00 00 33 00 00 33 04 00 00 00 | 3 3 0030 | 00 00 00 00 33 00 00 33 05 00 00 00 00 00 00 00 | 3 3 diff --git a/tests/GC-Episode3BattleWithSpectatorTeam.rdtest.txt b/tests/GC-Episode3BattleWithSpectatorTeam.rdtest.txt index ab6a81ed..bed018bf 100644 --- a/tests/GC-Episode3BattleWithSpectatorTeam.rdtest.txt +++ b/tests/GC-Episode3BattleWithSpectatorTeam.rdtest.txt @@ -8240,7 +8240,7 @@ I 64538 2024-09-01 15:24:45 - [Commands] Sending to C-A @ ipss:N-6:127.0.0.1:593 0090 | 00 00 00 00 33 00 00 33 0D 00 00 00 00 00 00 00 | 3 3 00A0 | 33 00 00 33 0E 00 00 00 00 00 00 00 33 00 00 33 | 3 3 3 3 00B0 | 0F 00 00 00 00 00 00 00 33 00 00 33 10 00 00 00 | 3 3 -00C0 | 00 00 00 00 33 00 00 33 11 00 00 00 00 00 00 00 | 3 3 +00C0 | 01 00 00 00 33 00 00 33 11 00 00 00 00 00 00 00 | 3 3 00D0 | 33 00 00 33 12 00 00 00 00 00 00 00 33 00 00 33 | 3 3 3 3 00E0 | 13 00 00 00 00 00 00 00 33 00 00 33 14 00 00 00 | 3 3 00F0 | 00 00 00 00 | @@ -12372,7 +12372,7 @@ I 64538 2024-09-01 15:24:56 - [Commands] Sending to C-C @ ipss:N-5:127.0.0.1:593 0090 | 00 00 00 00 33 00 00 33 0D 00 00 00 00 00 00 00 | 3 3 00A0 | 33 00 00 33 0E 00 00 00 00 00 00 00 33 00 00 33 | 3 3 3 3 00B0 | 0F 00 00 00 00 00 00 00 33 00 00 33 10 00 00 00 | 3 3 -00C0 | 00 00 00 00 33 00 00 33 11 00 00 00 00 00 00 00 | 3 3 +00C0 | 01 00 00 00 33 00 00 33 11 00 00 00 00 00 00 00 | 3 3 00D0 | 33 00 00 33 12 00 00 00 00 00 00 00 33 00 00 33 | 3 3 3 3 00E0 | 13 00 00 00 00 00 00 00 33 00 00 33 14 00 00 00 | 3 3 00F0 | 00 00 00 00 |