diff --git a/Lobby.hh b/Lobby.hh index 1eb7574d..11aeac88 100644 --- a/Lobby.hh +++ b/Lobby.hh @@ -20,6 +20,7 @@ enum LobbyFlag { QuestInProgress = 0x10, // game only JoinableQuestInProgress = 0x20, // game only Default = 0x40, // lobby only; false for private lobbies + Persistent = 0x80, // if not set, lobby is deleted when empty }; struct Lobby { diff --git a/ReceiveCommands.cc b/ReceiveCommands.cc index 5a87e515..62639c8c 100644 --- a/ReceiveCommands.cc +++ b/ReceiveCommands.cc @@ -755,7 +755,7 @@ void process_menu_selection(shared_ptr s, shared_ptr c, } } -void process_change_lobby(shared_ptr s, shared_ptr c, +void process_change_lobby(shared_ptr s, shared_ptr c, uint16_t command, uint32_t flag, uint16_t size, const void* data) { // 84 struct Cmd { uint32_t menu_id; diff --git a/ServerState.cc b/ServerState.cc index dc47cde6..931b3412 100644 --- a/ServerState.cc +++ b/ServerState.cc @@ -22,7 +22,8 @@ ServerState::ServerState() : run_dns_server(true), run_interactive_shell(true), for (size_t x = 0; x < 20; x++) { auto lobby_name = decode_sjis(string_printf("LOBBY%zu", x + 1)); shared_ptr l(new Lobby()); - l->flags |= LobbyFlag::Public | LobbyFlag::Default | ((x > 14) ? LobbyFlag::Episode3 : 0); + l->flags |= LobbyFlag::Public | LobbyFlag::Default | LobbyFlag::Persistent | + ((x > 14) ? LobbyFlag::Episode3 : 0); l->block = x + 1; l->type = x; char16cpy(l->name, lobby_name.c_str(), 0x24);