From 16bb320ed8aa0529b2bab995d560450a276fbf2e Mon Sep 17 00:00:00 2001 From: Martin Michelsen Date: Tue, 10 Oct 2023 15:11:28 -0700 Subject: [PATCH] add yet another spectator metadata send --- src/Episode3/Server.cc | 7 ++++ tests/GC-Episode3Battle.test.txt | 19 ++++++++++ tests/GC-Episode3BattleWithSpectator.test.txt | 38 +++++++++++++++++++ 3 files changed, 64 insertions(+) diff --git a/src/Episode3/Server.cc b/src/Episode3/Server.cc index be4b1934..84f8d7a2 100644 --- a/src/Episode3/Server.cc +++ b/src/Episode3/Server.cc @@ -1520,6 +1520,13 @@ void Server::setup_and_start_battle() { this->battle_start_usecs = now(); this->send_6xB4x46(); + + // Re-send game metadata to spectator teams, since loading the battle scene + // seems to delete it + auto l = this->lobby.lock(); + if (l) { + send_ep3_update_game_metadata(l); + } } G_SetStateFlags_GC_Ep3_6xB4x03 Server::prepare_6xB4x03() const { diff --git a/tests/GC-Episode3Battle.test.txt b/tests/GC-Episode3Battle.test.txt index 70fb669f..7527e23f 100644 --- a/tests/GC-Episode3Battle.test.txt +++ b/tests/GC-Episode3Battle.test.txt @@ -6988,6 +6988,25 @@ I 16332 2023-09-17 10:15:45 - [Commands] Sending to C-2 (Tali) (version=GC comma 00A0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | 00B0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | 00C0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | +I 16332 2023-09-17 10:15:45 - [Commands] Sending to C-2 (Tali) (version=GC command=C9 flag=00) +0000 | C9 00 14 01 B4 44 00 00 52 00 00 00 00 00 00 00 | D R +0010 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | +0020 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | +0030 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | +0040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | +0050 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | +0060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | +0070 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | +0080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | +0090 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | +00A0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | +00B0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | +00C0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | +00D0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | +00E0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | +00F0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | +0100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | +0110 | 00 00 00 00 | I 16332 2023-09-17 10:15:47 - [Commands] Received from C-2 (Tali) (version=GC command=60 flag=00) 0000 | 60 00 08 00 22 01 00 00 | ` " I 16332 2023-09-17 10:15:59 - [Commands] Received from C-2 (Tali) (version=GC command=CA flag=00) diff --git a/tests/GC-Episode3BattleWithSpectator.test.txt b/tests/GC-Episode3BattleWithSpectator.test.txt index b2c7fb6f..88c9491d 100644 --- a/tests/GC-Episode3BattleWithSpectator.test.txt +++ b/tests/GC-Episode3BattleWithSpectator.test.txt @@ -11715,6 +11715,44 @@ I 17097 2023-09-19 21:54:58 - [Commands] Sending to C-4 (Tali) (version=GC comma 00A0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | 00B0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | 00C0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | +I 17097 2023-09-19 21:54:58 - [Commands] Sending to C-2 (Tali) (version=GC command=C9 flag=00) +0000 | C9 00 14 01 B4 44 00 00 52 00 00 00 00 00 01 00 | D R +0010 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | +0020 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | +0030 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | +0040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | +0050 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | +0060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | +0070 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | +0080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | +0090 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | +00A0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | +00B0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | +00C0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | +00D0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | +00E0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | +00F0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | +0100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | +0110 | 00 00 00 00 | +I 17097 2023-09-19 21:54:58 - [Commands] Sending to C-4 (Tali) (version=GC command=C9 flag=00) +0000 | C9 00 14 01 B4 44 00 00 52 00 00 00 01 00 01 00 | D R +0010 | 00 00 1D 00 56 69 65 77 69 6E 67 20 62 61 74 74 | Viewing batt +0020 | 6C 65 20 69 6E 20 67 61 6D 65 20 09 45 31 31 31 | le in game E111 +0030 | 31 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | 1 +0040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | +0050 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | +0060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | +0070 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | +0080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | +0090 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | +00A0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | +00B0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | +00C0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | +00D0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | +00E0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | +00F0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | +0100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | +0110 | 00 00 00 00 | I 17097 2023-09-19 21:55:00 - [Commands] Received from C-2 (Tali) (version=GC command=60 flag=00) 0000 | 60 00 08 00 22 01 00 00 | ` " I 17097 2023-09-19 21:55:00 - [Commands] Sending to C-4 (Tali) (version=GC command=60 flag=00)