add set-ep3-menu-song
This commit is contained in:
@@ -371,6 +371,10 @@ void process_login_d_e_pc_gc(shared_ptr<ServerState> s, shared_ptr<Client> c,
|
|||||||
c->bb_player_index = 0;
|
c->bb_player_index = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ((c->flags & ClientFlag::Episode3Games) && (s->ep3_menu_song >= 0)) {
|
||||||
|
send_ep3_change_music(c, s->ep3_menu_song);
|
||||||
|
}
|
||||||
|
|
||||||
send_update_client_config(c);
|
send_update_client_config(c);
|
||||||
|
|
||||||
process_login_complete(s, c);
|
process_login_complete(s, c);
|
||||||
|
|||||||
+10
-1
@@ -57,7 +57,13 @@ Commands:\n\
|
|||||||
Enable or disable allowing unregistered users on the server. Disabling this\n\
|
Enable or disable allowing unregistered users on the server. Disabling this\n\
|
||||||
does not disconnect unregistered users who are already connected.\n\
|
does not disconnect unregistered users who are already connected.\n\
|
||||||
set-event <event>\n\
|
set-event <event>\n\
|
||||||
Set the event in all lobbies.\n\
|
Set the event in all lobbies, and in the main menu before joining a lobby.\n\
|
||||||
|
<event> can be none, xmas, val, easter, hallo, sonic, newyear, summer,\n\
|
||||||
|
white, wedding, fall, s-spring, s-summer, or spring.\n\
|
||||||
|
set-ep3-menu-song <song-num>\n\
|
||||||
|
Set the song that plays in the main menu for Episode III clients. If an\n\
|
||||||
|
event is also set, the event's visuals appear but this song still plays.\n\
|
||||||
|
Song IDs are 0 through 51; the default song is -1.\n\
|
||||||
announce <message>\n\
|
announce <message>\n\
|
||||||
Send an announcement message to all players.\n\
|
Send an announcement message to all players.\n\
|
||||||
");
|
");
|
||||||
@@ -176,6 +182,9 @@ Commands:\n\
|
|||||||
}
|
}
|
||||||
send_change_event(this->state, event_id);
|
send_change_event(this->state, event_id);
|
||||||
|
|
||||||
|
} else if (command_name == "set-ep3-menu-song") {
|
||||||
|
this->state->ep3_menu_song = stoul(command_args, nullptr, 0);
|
||||||
|
|
||||||
} else if (command_name == "announce") {
|
} else if (command_name == "announce") {
|
||||||
u16string message16 = decode_sjis(command_args);
|
u16string message16 = decode_sjis(command_args);
|
||||||
send_text_message(this->state, message16.c_str());
|
send_text_message(this->state, message16.c_str());
|
||||||
|
|||||||
+2
-1
@@ -18,7 +18,8 @@ ServerState::ServerState()
|
|||||||
ip_stack_debug(false),
|
ip_stack_debug(false),
|
||||||
allow_unregistered_users(false),
|
allow_unregistered_users(false),
|
||||||
run_shell_behavior(RunShellBehavior::Default), next_lobby_id(1),
|
run_shell_behavior(RunShellBehavior::Default), next_lobby_id(1),
|
||||||
pre_lobby_event(0) {
|
pre_lobby_event(0),
|
||||||
|
ep3_menu_song(-1) {
|
||||||
memset(&this->default_key_file, 0, sizeof(this->default_key_file));
|
memset(&this->default_key_file, 0, sizeof(this->default_key_file));
|
||||||
|
|
||||||
this->main_menu.emplace_back(MAIN_MENU_GO_TO_LOBBY, u"Go to lobby",
|
this->main_menu.emplace_back(MAIN_MENU_GO_TO_LOBBY, u"Go to lobby",
|
||||||
|
|||||||
@@ -56,6 +56,7 @@ struct ServerState {
|
|||||||
std::map<int64_t, std::shared_ptr<Lobby>> id_to_lobby;
|
std::map<int64_t, std::shared_ptr<Lobby>> id_to_lobby;
|
||||||
std::atomic<int32_t> next_lobby_id;
|
std::atomic<int32_t> next_lobby_id;
|
||||||
uint8_t pre_lobby_event;
|
uint8_t pre_lobby_event;
|
||||||
|
int32_t ep3_menu_song;
|
||||||
|
|
||||||
std::map<std::string, uint32_t> all_addresses;
|
std::map<std::string, uint32_t> all_addresses;
|
||||||
uint32_t local_address;
|
uint32_t local_address;
|
||||||
|
|||||||
Reference in New Issue
Block a user