add persistent lobby flag

This commit is contained in:
Martin Michelsen
2019-01-29 00:17:25 -08:00
parent f3842b49f3
commit aecc263f69
3 changed files with 4 additions and 2 deletions
+1
View File
@@ -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 {
+1 -1
View File
@@ -755,7 +755,7 @@ void process_menu_selection(shared_ptr<ServerState> s, shared_ptr<Client> c,
}
}
void process_change_lobby(shared_ptr<ServerState> s, shared_ptr<Client> c,
void process_change_lobby(shared_ptr<ServerState> s, shared_ptr<Client> c,
uint16_t command, uint32_t flag, uint16_t size, const void* data) { // 84
struct Cmd {
uint32_t menu_id;
+2 -1
View File
@@ -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<Lobby> 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);