diff --git a/src/CommandFormats.hh b/src/CommandFormats.hh index 08a9d912..91225cfc 100644 --- a/src/CommandFormats.hh +++ b/src/CommandFormats.hh @@ -1124,7 +1124,7 @@ struct C_OpenFileConfirmation_44_A6 { // command number RcvStartGame2 might have been. // Header flag = entry count -template +template struct S_JoinGame { // Note: It seems Sega servers sent uninitialized memory in the variations // field when sending this command to start an Episode 3 tournament game. This @@ -1164,9 +1164,9 @@ struct S_JoinGame_DCNTE_64 { parray lobby_data; } __packed__; -struct S_JoinGame_PC_64 : S_JoinGame { +struct S_JoinGame_PC_64 : S_JoinGame { } __packed__; -struct S_JoinGame_DC_GC_64 : S_JoinGame { +struct S_JoinGame_DC_GC_64 : S_JoinGame { } __packed__; struct S_JoinGame_GC_Ep3_64 : S_JoinGame_DC_GC_64 { @@ -1179,11 +1179,11 @@ struct S_JoinGame_GC_Ep3_64 : S_JoinGame_DC_GC_64 { } __packed__ players_ep3[4]; } __packed__; -struct S_JoinGame_XB_64 : S_JoinGame { +struct S_JoinGame_XB_64 : S_JoinGame { parray unknown_a1; } __packed__; -struct S_JoinGame_BB_64 : S_JoinGame { +struct S_JoinGame_BB_64 : S_JoinGame { } __packed__; // 65 (S->C): Add player to game diff --git a/src/SendCommands.cc b/src/SendCommands.cc index 0bd41603..3212c088 100644 --- a/src/SendCommands.cc +++ b/src/SendCommands.cc @@ -1459,7 +1459,7 @@ static void send_join_spectator_team(shared_ptr c, shared_ptr l) send_command_t(c, 0xE8, player_count, cmd); } -template +template void send_join_game_t(shared_ptr c, shared_ptr l) { if (l->flags & Lobby::Flag::IS_SPECTATOR_TEAM) { send_join_spectator_team(c, l); @@ -1467,17 +1467,17 @@ void send_join_game_t(shared_ptr c, shared_ptr l) { } bool is_ep3 = l->is_ep3(); - string data(is_ep3 ? sizeof(S_JoinGame_GC_Ep3_64) : sizeof(S_JoinGame), '\0'); + string data(is_ep3 ? sizeof(S_JoinGame_GC_Ep3_64) : sizeof(S_JoinGame), '\0'); // TODO: This is a terrible way to handle the different Ep3 format within the // template. Find a way to make this cleaner. - auto* cmd = reinterpret_cast*>(data.data()); + auto* cmd = reinterpret_cast*>(data.data()); S_JoinGame_GC_Ep3_64* cmd_ep3 = nullptr; if (is_ep3) { cmd_ep3 = reinterpret_cast(data.data()); new (cmd_ep3) S_JoinGame_GC_Ep3_64(); } else { - new (cmd) S_JoinGame(); + new (cmd) S_JoinGame(); } cmd->variations = l->variations; @@ -1687,7 +1687,7 @@ void send_join_lobby(shared_ptr c, shared_ptr l) { if (l->is_game()) { switch (c->version()) { case GameVersion::PC: - send_join_game_t(c, l); + send_join_game_t(c, l); break; case GameVersion::DC: if (c->flags & (Client::Flag::IS_TRIAL_EDITION | Client::Flag::IS_DC_V1_PROTOTYPE)) { @@ -1696,13 +1696,13 @@ void send_join_lobby(shared_ptr c, shared_ptr l) { } [[fallthrough]]; case GameVersion::GC: - send_join_game_t(c, l); + send_join_game_t(c, l); break; case GameVersion::XB: - send_join_game_t(c, l); + send_join_game_t(c, l); break; case GameVersion::BB: - send_join_game_t(c, l); + send_join_game_t(c, l); break; default: throw logic_error("unimplemented versioned command");