From a3d677316a7698dcaa111d16fd2c823228036789 Mon Sep 17 00:00:00 2001 From: Martin Michelsen Date: Sat, 25 Nov 2023 19:35:09 -0800 Subject: [PATCH] fix DC NTE game join sync commands --- src/ReceiveSubcommands.cc | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/ReceiveSubcommands.cc b/src/ReceiveSubcommands.cc index 115b3ad4..027ae0fc 100644 --- a/src/ReceiveSubcommands.cc +++ b/src/ReceiveSubcommands.cc @@ -2639,7 +2639,17 @@ static void handle_subcommand_dc_nte(shared_ptr c, uint8_t command, uint // In a game, assume all other clients are DC NTE as well and forward the // subcommand without any processing - forward_subcommand(c, command, flag, data, size); + if (command_is_private(command)) { + if (flag < l->max_clients && l->clients[flag]) { + send_command(l->clients[flag], command, flag, data, size); + } + } else { + for (auto& lc : l->clients) { + if (lc && (lc != c)) { + send_command(lc, command, flag, data, size); + } + } + } } else { // In a lobby, we have to deal with all other versions of the game having