diff --git a/src/CommandFormats.hh b/src/CommandFormats.hh index 28c9a1ef..a95ee3d2 100644 --- a/src/CommandFormats.hh +++ b/src/CommandFormats.hh @@ -1364,11 +1364,13 @@ struct S_LeaveLobby_66_69_Ep3_E9 { // 6E: Invalid command -// 6F (C->S): Set game status +// 6F (C->S): Done loading // Internal name: SndBurstEnd // This command is sent when a player is done loading and other players can then -// join the game. On BB, this command is sent as 016F if a quest is in progress -// and the game should not be joined by anyone else. +// join the game. On BB, this command is sent a 006F after loading into a game, +// or as 016F after loading a joinable quest. (This means when a BB client joins +// a game with a quest in progress, they will send 006F when they're ready to +// receive the quest files, and 016F when they're actually ready to play.) // 70: Invalid command // 71: Invalid command diff --git a/src/ReceiveCommands.cc b/src/ReceiveCommands.cc index 1b193b88..4f36fa64 100644 --- a/src/ReceiveCommands.cc +++ b/src/ReceiveCommands.cc @@ -3654,7 +3654,7 @@ static void on_8A(shared_ptr c, uint16_t, uint32_t, string& data) { } } -static void on_6F(shared_ptr c, uint16_t, uint32_t, string& data) { +static void on_6F(shared_ptr c, uint16_t command, uint32_t, string& data) { check_size_v(data.size(), 0); auto l = c->require_lobby(); @@ -3668,11 +3668,10 @@ static void on_6F(shared_ptr c, uint16_t, uint32_t, string& data) { send_set_exp_multiplier(l); } send_server_time(c); - // Only get player info again on BB, since on other versions the returned info - // only includes items that would be saved if the client disconnects - // unexpectedly (that is, only equipped items are included). - if (c->version() == GameVersion::BB) { - send_get_player_info(c); + + // BB sends 016F when the client is done loading a quest. In that case, we + // shouldn't send the quest to them again! + if (command == 0x006F && c->version() == GameVersion::BB) { if (l->check_flag(Lobby::Flag::JOINABLE_QUEST_IN_PROGRESS)) { if (!l->quest) { throw runtime_error("JOINABLE_QUEST_IN_PROGRESS is set, but lobby has no quest");