diff --git a/lang/Czech.ini b/lang/Czech.ini index 5a6d76fe..63c4b25a 100644 --- a/lang/Czech.ini +++ b/lang/Czech.ini @@ -203,6 +203,7 @@ BOUNCY_BOUNDS_ON = "Zapnuto" BOUNCY_BOUNDS_OFF = "Vypnuto" BOUNCY_LEVEL_BOUNDS = "Omezení odražejícího úrovně" AMOUNT_OF_PLAYERS = "Počet hráčů" +PAUSE_ANYWHERE = "Pozastavit kdekoli" [HOST] SERVER_TITLE = "SERVER" diff --git a/lang/Dutch.ini b/lang/Dutch.ini index 6eae13e7..8a519fe8 100644 --- a/lang/Dutch.ini +++ b/lang/Dutch.ini @@ -203,6 +203,7 @@ BOUNCY_BOUNDS_ON = "Aan" BOUNCY_BOUNDS_OFF = "Uit" BOUNCY_LEVEL_BOUNDS = "Springende Niveau Grenzen" AMOUNT_OF_PLAYERS = "Hoeveelheid spelers" +PAUSE_ANYWHERE = "Pauzeer waar dan ook" [HOST] SERVER_TITLE = "SERVER" diff --git a/lang/English.ini b/lang/English.ini index cdf6344b..bf7998c5 100644 --- a/lang/English.ini +++ b/lang/English.ini @@ -203,6 +203,7 @@ BOUNCY_BOUNDS_ON = "ON" BOUNCY_BOUNDS_OFF = "OFF" BOUNCY_LEVEL_BOUNDS = "Bouncy Level Bounds" AMOUNT_OF_PLAYERS = "Amount of players" +PAUSE_ANYWHERE = "Pause anywhere" [HOST] SERVER_TITLE = "SERVER" diff --git a/lang/French.ini b/lang/French.ini index 4114b8fc..ba60d57c 100644 --- a/lang/French.ini +++ b/lang/French.ini @@ -203,6 +203,7 @@ BOUNCY_BOUNDS_ON = "Allumé" BOUNCY_BOUNDS_OFF = "Éteint" BOUNCY_LEVEL_BOUNDS = "Limites de Niveau Rebondissant" AMOUNT_OF_PLAYERS = "Nombre de joueurs" +PAUSE_ANYWHERE = "Faites une pause n'importe où" [HOST] SERVER_TITLE = "SERVEUR" diff --git a/lang/German.ini b/lang/German.ini index a909dd27..2d86047a 100644 --- a/lang/German.ini +++ b/lang/German.ini @@ -203,6 +203,7 @@ BOUNCY_BOUNDS_ON = "An" BOUNCY_BOUNDS_OFF = "Aus" BOUNCY_LEVEL_BOUNDS = "Elastische Levelgrenzen" AMOUNT_OF_PLAYERS = "Spieleranzahl" +PAUSE_ANYWHERE = "Machen Sie irgendwo eine Pause" [HOST] SERVER_TITLE = "SERVER" diff --git a/lang/Italian.ini b/lang/Italian.ini index 57fb669c..0d4c1b23 100644 --- a/lang/Italian.ini +++ b/lang/Italian.ini @@ -201,6 +201,7 @@ BOUNCY_BOUNDS_ON = "Acceso" BOUNCY_BOUNDS_OFF = "Spento" BOUNCY_LEVEL_BOUNDS = "Limiti Livello Rimbalzante" AMOUNT_OF_PLAYERS = "Numero di giocatori" +PAUSE_ANYWHERE = "Pausa ovunque" [HOST] SERVER_TITLE = "SERVER" diff --git a/lang/Polish.ini b/lang/Polish.ini index 26b15094..77f4ce46 100644 --- a/lang/Polish.ini +++ b/lang/Polish.ini @@ -203,6 +203,7 @@ BOUNCY_BOUNDS_ON = "Na" BOUNCY_BOUNDS_OFF = "Wył" BOUNCY_LEVEL_BOUNDS = "Odbijane Granice Poziomów" AMOUNT_OF_PLAYERS = "Liczba Graczy" +PAUSE_ANYWHERE = "Zatrzymaj się w dowolnym miejscu" [HOST] SERVER_TITLE = "SERWER" diff --git a/lang/Portuguese.ini b/lang/Portuguese.ini index 590a6da6..aa5644b8 100644 --- a/lang/Portuguese.ini +++ b/lang/Portuguese.ini @@ -203,6 +203,7 @@ BOUNCY_BOUNDS_ON = "Ligado" BOUNCY_BOUNDS_OFF = "Desligado" BOUNCY_LEVEL_BOUNDS = "Limites de fase saltitante" AMOUNT_OF_PLAYERS = "Quantidade de jogadores" +PAUSE_ANYWHERE = "Faça uma pausa em qualquer lugar" [HOST] SERVER_TITLE = "SERVIDOR" diff --git a/lang/Russian.ini b/lang/Russian.ini index e5f0b688..9b177a8e 100644 --- a/lang/Russian.ini +++ b/lang/Russian.ini @@ -202,6 +202,7 @@ BOUNCY_BOUNDS_ON = "Вкл" BOUNCY_BOUNDS_OFF = "Выкл" BOUNCY_LEVEL_BOUNDS = "Пределы упругого уровня" AMOUNT_OF_PLAYERS = "Количество игроков" +PAUSE_ANYWHERE = "Пауза в любом месте" [HOST] SERVER_TITLE = "SERVER" diff --git a/lang/Spanish.ini b/lang/Spanish.ini index ee06e06c..79e675a3 100644 --- a/lang/Spanish.ini +++ b/lang/Spanish.ini @@ -203,6 +203,7 @@ BOUNCY_BOUNDS_ON = "Encendido" BOUNCY_BOUNDS_OFF = "Apagado" BOUNCY_LEVEL_BOUNDS = "Límites de Nivel Rebote" AMOUNT_OF_PLAYERS = "Número de jugadores" +PAUSE_ANYWHERE = "Pausa en cualquier lugar" [HOST] SERVER_TITLE = "PARTIDA" diff --git a/src/game/level_update.c b/src/game/level_update.c index fbce8510..c2535546 100644 --- a/src/game/level_update.c +++ b/src/game/level_update.c @@ -257,10 +257,9 @@ u32 pressed_pause(void) { return TRUE; } - // I don't agree with this official change, mods use ACT_FLAG_INTANGIBLE to prevent the player from pausing in things like cutscenes - // if (get_dialog_id() < 0) { - // return gPlayer1Controller->buttonPressed & START_BUTTON; - // } + if (gServerSettings.pauseAnywhere && get_dialog_id() < 0) { + return gPlayer1Controller->buttonPressed & START_BUTTON; + } return FALSE; } diff --git a/src/pc/configfile.c b/src/pc/configfile.c index be8495a0..63525b84 100644 --- a/src/pc/configfile.c +++ b/src/pc/configfile.c @@ -118,6 +118,7 @@ bool configCameraMouse = false; // coop-specific bool configSkipIntro = 0; bool configBubbleDeath = true; +bool configPauseAnywhere = false; unsigned int configAmountofPlayers = 16; char configJoinIp[MAX_CONFIG_STRING] = ""; unsigned int configJoinPort = DEFAULT_PORT; @@ -220,6 +221,7 @@ static const struct ConfigOption options[] = { {.name = "bettercam_pan_level", .type = CONFIG_TYPE_UINT, .uintValue = &configCameraPan}, {.name = "bettercam_degrade", .type = CONFIG_TYPE_UINT, .uintValue = &configCameraDegrade}, {.name = "skip_intro", .type = CONFIG_TYPE_BOOL, .boolValue = &configSkipIntro}, + {.name = "pause_anywhere", .type = CONFIG_TYPE_BOOL, .boolValue = &configPauseAnywhere}, // debug {.name = "debug_offset", .type = CONFIG_TYPE_U64 , .u64Value = &gPcDebug.bhvOffset}, {.name = "debug_tags", .type = CONFIG_TYPE_U64 , .u64Value = gPcDebug.tags}, diff --git a/src/pc/configfile.h b/src/pc/configfile.h index f9241410..00aff835 100644 --- a/src/pc/configfile.h +++ b/src/pc/configfile.h @@ -77,6 +77,7 @@ extern bool configCameraMouse; extern bool configCameraAnalog; extern bool configSkipIntro; extern bool configBubbleDeath; +extern bool configPauseAnywhere; extern unsigned int configAmountofPlayers; extern char configJoinIp[]; extern unsigned int configJoinPort; diff --git a/src/pc/djui/djui_panel_host_settings.c b/src/pc/djui/djui_panel_host_settings.c index 7dd6ab5e..cda44231 100644 --- a/src/pc/djui/djui_panel_host_settings.c +++ b/src/pc/djui/djui_panel_host_settings.c @@ -59,6 +59,7 @@ void djui_panel_host_settings_create(struct DjuiBase* caller) { djui_selectionbox_create(body, DLANG(HOST_SETTINGS, ON_STAR_COLLECTION), lChoices, 3, &configStayInLevelAfterStar, NULL); djui_checkbox_create(body, DLANG(HOST_SETTINGS, SKIP_INTRO_CUTSCENE), &configSkipIntro, NULL); + djui_checkbox_create(body, DLANG(HOST_SETTINGS, PAUSE_ANYWHERE), &configPauseAnywhere, NULL); djui_checkbox_create(body, DLANG(HOST_SETTINGS, BUBBLE_ON_DEATH), &configBubbleDeath, NULL); djui_checkbox_create(body, DLANG(HOST_SETTINGS, NAMETAGS), &configNametags, NULL); @@ -84,7 +85,7 @@ void djui_panel_host_settings_create(struct DjuiBase* caller) { djui_interactable_hook_value_change(&inputbox1->base, djui_panel_host_player_text_change); sPlayerAmount = inputbox1; } - + djui_button_create(body, DLANG(MENU, BACK), DJUI_BUTTON_STYLE_BACK, djui_panel_menu_back); } djui_panel_add(caller, panel, NULL); diff --git a/src/pc/network/network.c b/src/pc/network/network.c index abea29ca..6de3409d 100644 --- a/src/pc/network/network.c +++ b/src/pc/network/network.c @@ -79,6 +79,7 @@ struct ServerSettings gServerSettings = { .headlessServer = FALSE, .nametags = TRUE, .maxPlayers = MAX_PLAYERS, + .pauseAnywhere = FALSE, }; struct NametagsSettings gNametagsSettings = { @@ -125,6 +126,7 @@ bool network_init(enum NetworkType inNetworkType, bool reconnecting) { gServerSettings.enablePlayerList = TRUE; gServerSettings.nametags = configNametags; gServerSettings.maxPlayers = configAmountofPlayers; + gServerSettings.pauseAnywhere = configPauseAnywhere; #if defined(RAPI_DUMMY) || defined(WAPI_DUMMY) gServerSettings.headlessServer = (inNetworkType == NT_SERVER); #else diff --git a/src/pc/network/network.h b/src/pc/network/network.h index 7410ef57..80703f88 100644 --- a/src/pc/network/network.h +++ b/src/pc/network/network.h @@ -82,6 +82,7 @@ struct ServerSettings { u8 headlessServer; u8 nametags; u8 maxPlayers; + u8 pauseAnywhere; }; struct NametagsSettings { diff --git a/src/pc/network/packets/packet_join.c b/src/pc/network/packets/packet_join.c index e26f0cbb..573fc597 100644 --- a/src/pc/network/packets/packet_join.c +++ b/src/pc/network/packets/packet_join.c @@ -120,6 +120,7 @@ void network_send_join(struct Packet* joinRequestPacket) { packet_write(&p, &gServerSettings.headlessServer, sizeof(u8)); packet_write(&p, &gServerSettings.nametags, sizeof(u8)); packet_write(&p, &gServerSettings.maxPlayers, sizeof(u8)); + packet_write(&p, &gServerSettings.pauseAnywhere, sizeof(u8)); packet_write(&p, eeprom, sizeof(u8) * 512); network_send_to(globalIndex, &p); @@ -172,6 +173,7 @@ void network_receive_join(struct Packet* p) { packet_read(p, &gServerSettings.headlessServer, sizeof(u8)); packet_read(p, &gServerSettings.nametags, sizeof(u8)); packet_read(p, &gServerSettings.maxPlayers, sizeof(u8)); + packet_read(p, &gServerSettings.pauseAnywhere, sizeof(u8)); packet_read(p, eeprom, sizeof(u8) * 512); network_player_connected(NPT_SERVER, 0, 0, &DEFAULT_MARIO_PALETTE, "Player");