diff --git a/src/game/level_update.c b/src/game/level_update.c index 520b20645..c7d012d89 100644 --- a/src/game/level_update.c +++ b/src/game/level_update.c @@ -906,6 +906,9 @@ void initiate_delayed_warp(void) { case WARP_OP_CREDITS_START: gCurrCreditsEntry = &sCreditsSequence[0]; + // instance players in the credits + gCurrActStarNum = 99; + gCurrActNum = 99; initiate_warp(gCurrCreditsEntry->levelNum, gCurrCreditsEntry->areaIndex, WARP_NODE_CREDITS_START, 0); break; @@ -1178,7 +1181,9 @@ s32 play_mode_change_level(void) { gHudDisplay.flags = HUD_DISPLAY_NONE; sTransitionTimer = 0; sTransitionUpdate = NULL; - gCurrActStarNum = 0; + if (gCurrActStarNum != 99) { + gCurrActStarNum = 0; + } if (sWarpDest.type != WARP_TYPE_NOT_WARPING) { return sWarpDest.levelNum; } else { @@ -1299,12 +1304,12 @@ s32 init_level(void) { set_mario_action(gMarioState, ACT_IDLE, 0); } else if (gDebugLevelSelect == 0) { if (gMarioState->action != ACT_UNINITIALIZED) { - bool skipIntro = (gNetworkType == NT_NONE); - if (gDjuiInMainMenu) { + bool skipIntro = (gNetworkType == NT_NONE || gServerSettings.skipIntro != 0); + if (gDjuiInMainMenu && (gNetworkType == NT_NONE)) { set_mario_action(gMarioState, ACT_INTRO_CUTSCENE, 7); - } else if (save_file_exists(gCurrSaveFileNum - 1) || skipIntro) { + } else if (skipIntro || save_file_exists(gCurrSaveFileNum - 1)) { set_mario_action(gMarioState, ACT_IDLE, 0); - } else if (gCLIOpts.SkipIntro == 0 && configSkipIntro == 0 && gServerSettings.skipIntro == 0) { + } else { set_mario_action(gMarioState, ACT_INTRO_CUTSCENE, 0); val4 = 1; } diff --git a/src/pc/djui/djui_panel.c b/src/pc/djui/djui_panel.c index 2e089b4f5..441634dca 100644 --- a/src/pc/djui/djui_panel.c +++ b/src/pc/djui/djui_panel.c @@ -2,6 +2,7 @@ #include "src/pc/utils/misc.h" #include "audio_defines.h" #include "audio/external.h" +#include "src/game/bettercamera.h" struct DjuiPanel { struct DjuiBase* base; @@ -145,11 +146,14 @@ void djui_panel_shutdown(void) { sPanelList = NULL; sPanelRemoving = NULL; sMoveAmount = 0; - gDjuiInMainMenu = false; gInteractableOverridePad = false; gDjuiPanelJoinMessageVisible = false; gDjuiPanelMainCreated = false; gDjuiPanelPauseCreated = false; djui_cursor_set_visible(false); configfile_save(configfile_name()); + if (gDjuiInMainMenu) { + gDjuiInMainMenu = false; + newcam_init_settings(); + } } \ No newline at end of file diff --git a/src/pc/network/packets/packet_change_area.c b/src/pc/network/packets/packet_change_area.c index 8082126df..bde53c907 100644 --- a/src/pc/network/packets/packet_change_area.c +++ b/src/pc/network/packets/packet_change_area.c @@ -35,8 +35,10 @@ void network_send_change_area(void) { // override castle act to 0 to prevent instancing of the hub if (gCurrCourseNum == 0 && (gCurrLevelNum == LEVEL_CASTLE || gCurrLevelNum == LEVEL_CASTLE_GROUNDS || gCurrLevelNum == LEVEL_CASTLE_COURTYARD)) { - gCurrActStarNum = 0; - gCurrActNum = 0; + if (gCurrActStarNum != 99) { + gCurrActStarNum = 0; + gCurrActNum = 0; + } } if (gNetworkType == NT_SERVER) { diff --git a/src/pc/network/packets/packet_change_level.c b/src/pc/network/packets/packet_change_level.c index b1264c577..44ccd8463 100644 --- a/src/pc/network/packets/packet_change_level.c +++ b/src/pc/network/packets/packet_change_level.c @@ -41,8 +41,10 @@ void network_send_change_level(void) { // override castle act to 0 to prevent instancing of the hub if (gCurrCourseNum == 0 && (gCurrLevelNum == LEVEL_CASTLE || gCurrLevelNum == LEVEL_CASTLE_GROUNDS || gCurrLevelNum == LEVEL_CASTLE_COURTYARD)) { - gCurrActStarNum = 0; - gCurrActNum = 0; + if (gCurrActStarNum != 99) { + gCurrActStarNum = 0; + gCurrActNum = 0; + } } if (gNetworkType == NT_SERVER) { diff --git a/src/pc/pc_main.c b/src/pc/pc_main.c index 3e16fc43c..66b18bb93 100644 --- a/src/pc/pc_main.c +++ b/src/pc/pc_main.c @@ -283,6 +283,7 @@ void main_func(void) { network_set_system(NS_SOCKET); configHostPort = gCLIOpts.NetworkPort; network_init(NT_SERVER); + djui_panel_shutdown(); } else { network_init(NT_NONE); }