add minor notes from Challenge RE

This commit is contained in:
Martin Michelsen
2026-05-28 08:29:37 -07:00
parent c3aacc2352
commit 3aa58e24b4
3 changed files with 10 additions and 4 deletions
+5 -1
View File
@@ -4812,7 +4812,7 @@ static asio::awaitable<void> on_request_challenge_grave_recovery_item_bb(std::sh
}
static asio::awaitable<void> on_challenge_mode_retry_or_quit(std::shared_ptr<Client> c, SubcommandMessage& msg) {
const auto& cmd = msg.check_size_t<G_SelectChallengeModeFailureOption_6x97>();
auto& cmd = msg.check_size_t<G_SelectChallengeModeFailureOption_6x97>();
auto l = c->require_lobby();
auto leader_c = l->clients.at(l->leader_id);
@@ -4820,6 +4820,10 @@ static asio::awaitable<void> on_challenge_mode_retry_or_quit(std::shared_ptr<Cli
throw std::runtime_error("6x97 sent by non-leader");
}
// Clear uninitialized memory sent by client
cmd.unused1 = 0;
cmd.unused2 = 0;
if (l->is_game() && (cmd.is_retry == 1) && l->quest && (l->quest->meta.challenge_template_index >= 0)) {
auto s = l->require_server_state();