mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2024-10-19 03:32:41 +00:00
Fixed loading of certain save flags, e.g. lakitu
This commit is contained in:
parent
d9ab09ee64
commit
22121eea6b
4 changed files with 23 additions and 0 deletions
|
@ -1443,3 +1443,19 @@ s32 lvl_exiting_credits(UNUSED s16 arg0, UNUSED s32 arg1) {
|
|||
gCurrActNum = 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
void fake_lvl_init_from_save_file(void) {
|
||||
sWarpDest.type = WARP_TYPE_NOT_WARPING;
|
||||
sDelayedWarpOp = WARP_OP_NONE;
|
||||
gShouldNotPlayCastleMusic = !save_file_exists(gCurrSaveFileNum - 1) && gServerSettings.skipIntro;
|
||||
if (gNetworkType == NT_NONE) { gShouldNotPlayCastleMusic = true; }
|
||||
|
||||
gCurrCreditsEntry = NULL;
|
||||
gSpecialTripleJump = 0;
|
||||
|
||||
init_mario_from_save_file();
|
||||
disable_warp_checkpoint();
|
||||
save_file_move_cap_to_default_location();
|
||||
select_mario_cam_mode();
|
||||
set_yoshi_as_not_dead();
|
||||
}
|
|
@ -155,4 +155,6 @@ void star_select_finish_selection(void);
|
|||
|
||||
s32 lvl_exiting_credits(UNUSED s16 arg0, UNUSED s32 arg1);
|
||||
|
||||
void fake_lvl_init_from_save_file(void);
|
||||
|
||||
#endif // LEVEL_UPDATE_H
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
#include "src/pc/utils/misc.h"
|
||||
#include "src/pc/configfile.h"
|
||||
#include "pc/utils/misc.h"
|
||||
#include "src/game/level_update.h"
|
||||
|
||||
#ifdef DISCORD_SDK
|
||||
static char* sWarningDiscord = "\
|
||||
|
@ -38,6 +39,7 @@ void djui_panel_host_message_do_host(struct DjuiBase* caller) {
|
|||
}
|
||||
#endif
|
||||
network_init(NT_SERVER);
|
||||
fake_lvl_init_from_save_file();
|
||||
extern s16 gChangeLevel;
|
||||
gChangeLevel = 16;
|
||||
}
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
#include "src/game/interaction.h"
|
||||
#include "src/engine/math_util.h"
|
||||
#include "src/game/save_file.h"
|
||||
#include "src/game/level_update.h"
|
||||
#include "src/pc/fs/fs.h"
|
||||
#include "PR/os_eeprom.h"
|
||||
#include "pc/network/version.h"
|
||||
|
@ -208,6 +209,8 @@ void network_receive_join(struct Packet* p) {
|
|||
|
||||
djui_panel_shutdown();
|
||||
update_all_mario_stars();
|
||||
|
||||
fake_lvl_init_from_save_file();
|
||||
extern s16 gChangeLevel;
|
||||
gChangeLevel = 16;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue