mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2026-04-27 12:31:47 +00:00
Force players in the credits sequence into the 'credits' instance
This commit is contained in:
parent
8984ec3ba8
commit
4a3b39061f
5 changed files with 24 additions and 10 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue