Skip to content

Commit

Permalink
fix telepipe desync during BB joinable quest load
Browse files Browse the repository at this point in the history
  • Loading branch information
fuzziqersoftware committed Jan 22, 2025
1 parent 5c807fa commit 4038221
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/CommandFormats.hh
Original file line number Diff line number Diff line change
Expand Up @@ -1304,7 +1304,11 @@ struct S_JoinGame_BB_64 : S_JoinGameT_DC_PC<PlayerLobbyDataBB> {
uint8_t episode = 0;
uint8_t unused = 0; // Corresponds to xb_enable_voice_chat; unused on BB
uint8_t solo_mode = 0;
uint8_t unused2 = 0;
// This flag should be nonzero if the joining client will load a quest
// immediately after joining. The only tangible effect of this flag being
// enabled is that the game won't delete all active telepipes during quest
// loading.
uint8_t is_in_quest = 0;
} __packed_ws__(S_JoinGame_BB_64, 0x1A0);

// 65 (S->C): Add player to game
Expand Down
2 changes: 1 addition & 1 deletion src/SendCommands.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2048,7 +2048,7 @@ void send_join_game(shared_ptr<Client> c, shared_ptr<Lobby> l) {
S_JoinGame_BB_64 cmd;
size_t player_count = populate_v3_cmd(cmd);
cmd.solo_mode = (l->mode == GameMode::SOLO) ? 1 : 0;
cmd.unused2 = 0;
cmd.is_in_quest = !!l->quest;
send_command_t(c, 0x64, player_count, cmd);
break;
}
Expand Down

0 comments on commit 4038221

Please sign in to comment.