From ccfdbf2fafe6260d8e357e5671ce8e1c23f087bc Mon Sep 17 00:00:00 2001 From: Martin Michelsen Date: Sat, 25 Nov 2023 16:53:05 -0800 Subject: [PATCH] use 6x1F instead of 6F to unlock DC NTE games --- src/ReceiveSubcommands.cc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/ReceiveSubcommands.cc b/src/ReceiveSubcommands.cc index 38593f02..115b3ad4 100644 --- a/src/ReceiveSubcommands.cc +++ b/src/ReceiveSubcommands.cc @@ -2630,6 +2630,13 @@ static void on_write_quest_global_flag_bb(shared_ptr c, uint8_t, uint8_t static void handle_subcommand_dc_nte(shared_ptr c, uint8_t command, uint8_t flag, const void* data, size_t size) { auto l = c->require_lobby(); if (l->is_game()) { + // DC NTE doesn't send 6F when it's done loading, so treat this command as + // 6F instead. + StringReader r(data, size); + if (r.get_u8() == 0x1F) { + c->config.clear_flag(Client::Flag::LOADING); + } + // 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);