Fix gLevelValues.entryLevel

This commit is contained in:
Agent X 2024-12-31 13:34:08 -05:00
parent 447e2f1121
commit 12bf74eb32
2 changed files with 8 additions and 4 deletions

View file

@ -28,6 +28,10 @@ void djui_panel_do_host(bool reconnecting, bool playSound) {
network_set_system(configNetworkSystem); network_set_system(configNetworkSystem);
network_init(NT_SERVER, reconnecting); network_init(NT_SERVER, reconnecting);
fake_lvl_init_from_save_file();
extern s16 gChangeLevelTransition;
gChangeLevelTransition = gLevelValues.entryLevel;
if (gMarioState->marioObj) vec3f_copy(gMarioState->marioObj->header.gfx.cameraToObject, gGlobalSoundSource); if (gMarioState->marioObj) vec3f_copy(gMarioState->marioObj->header.gfx.cameraToObject, gGlobalSoundSource);
if (playSound) { gDelayedInitSound = CHAR_SOUND_OKEY_DOKEY; } if (playSound) { gDelayedInitSound = CHAR_SOUND_OKEY_DOKEY; }

View file

@ -170,15 +170,15 @@ bool network_init(enum NetworkType inNetworkType, bool reconnecting) {
djui_chat_box_create(); djui_chat_box_create();
djui_panel_shutdown(); djui_panel_shutdown();
fake_lvl_init_from_save_file();
mods_activate(&gLocalMods); mods_activate(&gLocalMods);
djui_panel_modlist_create(NULL); djui_panel_modlist_create(NULL);
smlua_init(); smlua_init();
dynos_behavior_hook_all_custom_behaviors(); dynos_behavior_hook_all_custom_behaviors();
extern s16 gChangeLevelTransition; if (gCurrLevelNum != (s16)gLevelValues.entryLevel) {
gChangeLevelTransition = gLevelValues.entryLevel; extern s16 gChangeLevelTransition;
gChangeLevelTransition = gLevelValues.entryLevel;
}
} }
configfile_save(configfile_name()); configfile_save(configfile_name());