diff --git a/src/game/level_update.c b/src/game/level_update.c index d0e19058..2c25fa3b 100644 --- a/src/game/level_update.c +++ b/src/game/level_update.c @@ -54,6 +54,7 @@ extern s8 sReceivedLoadedActNum; u8 gRejectInstantWarp = 0; s16 gChangeLevel = -1; +s16 gChangeLevelTransition = -1; s16 gChangeAreaIndex = -1; s16 gChangeActNum = -1; @@ -1245,6 +1246,15 @@ s32 update_level(void) { sTransitionUpdate = NULL; changeLevel = gChangeLevel; gChangeLevel = -1; + gChangeLevelTransition = -1; + return changeLevel; + } else if (!gWarpTransition.isActive && sDelayedWarpOp == WARP_OP_NONE && gChangeLevelTransition != -1) { + gHudDisplay.flags = HUD_DISPLAY_NONE; + sTransitionTimer = 0; + sTransitionUpdate = NULL; + changeLevel = gChangeLevelTransition; + gChangeLevel = -1; + gChangeLevelTransition = -1; return changeLevel; } diff --git a/src/pc/djui/djui_panel_host_message.c b/src/pc/djui/djui_panel_host_message.c index 1dc6d78f..3495b45a 100644 --- a/src/pc/djui/djui_panel_host_message.c +++ b/src/pc/djui/djui_panel_host_message.c @@ -6,6 +6,8 @@ #include "src/pc/configfile.h" #include "pc/utils/misc.h" #include "src/game/level_update.h" +#include "audio/external.h" +#include "audio_defines.h" #ifdef DISCORD_SDK static char* sWarningDiscord = "\ @@ -40,8 +42,11 @@ 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; + extern s16 gChangeLevelTransition; + gChangeLevelTransition = 16; + play_sound(SOUND_MENU_STAR_SOUND_OKEY_DOKEY, gDefaultSoundArgs); + extern void play_transition(s16 transType, s16 time, u8 red, u8 green, u8 blue); + play_transition(0x09, 0x14, 0x00, 0x00, 0x00); } void djui_panel_host_message_create(struct DjuiBase* caller) {