diff --git a/src/ReceiveCommands.cc b/src/ReceiveCommands.cc index 8f730650..48af1bba 100644 --- a/src/ReceiveCommands.cc +++ b/src/ReceiveCommands.cc @@ -2762,7 +2762,6 @@ static asio::awaitable on_10_main_menu(std::shared_ptr c, uint32_t c->log.info_f("Brutal Peeps +{} selected from BB menu at level {}", tier, character_level); co_await send_auto_patches_if_needed(c); - co_await send_brutal_peeps_hp_patch_bb(c, tier); co_await enable_save_if_needed(c); send_lobby_list(c); if (!c->lobby.lock()) { @@ -5572,9 +5571,11 @@ static asio::awaitable on_6F(std::shared_ptr c, Channel::Message& // Episode 3 sends a 6F after a CAx21 (end battle) command, so we shouldn't reassign the item IDs again in that case // (even though item IDs really don't matter for Ep3) + bool loading_flag_cleared = false; if (c->check_flag(Client::Flag::LOADING)) { c->clear_flag(Client::Flag::LOADING); c->log.info_f("LOADING flag cleared"); + loading_flag_cleared = true; // The client sends 6F when it has created its TObjPlayer and assigned its item IDs. For the leader, however, this // happens before any inbound commands are processed, so we already did it when the client was added to the lobby. @@ -5584,6 +5585,11 @@ static asio::awaitable on_6F(std::shared_ptr c, Channel::Message& } } + if (loading_flag_cleared && (c->version() == Version::BB_V4)) { + int64_t brutal_peeps_hp_patch_tier = (l->brutal_peeps_tier >= 1) ? l->brutal_peeps_tier : -1; + co_await send_brutal_peeps_hp_patch_bb(c, brutal_peeps_hp_patch_tier); + } + // DC NTE creates players in the invisible state by default; if the joiner is not DC NTE, it won't send 6x23 to make // itself visible, so we have to do it for (const auto& lc : l->clients) { diff --git a/src/SendCommands.cc b/src/SendCommands.cc index aa8767ca..bc5309dc 100644 --- a/src/SendCommands.cc +++ b/src/SendCommands.cc @@ -912,7 +912,11 @@ asio::awaitable send_brutal_peeps_hp_patch_bb(std::shared_ptr c, i auto promise = send_brutal_peeps_hp_patch_bb_now(c, tier); if (promise && c->channel->connected()) { - co_await promise->get(); + auto result = co_await promise->get(); + c->log.info_f("Brutal Peeps HP client patch result: tier={} return_value={:08X} checksum={:08X}", + tier, + static_cast(result.return_value), + static_cast(result.checksum)); } } catch (const std::exception& e) {