diff --git a/src/pc/network/network.c b/src/pc/network/network.c index 6de3409d..ce3e1810 100644 --- a/src/pc/network/network.c +++ b/src/pc/network/network.c @@ -621,6 +621,8 @@ void network_update(void) { } void network_shutdown(bool sendLeaving, bool exiting, bool popup, bool reconnecting) { + smlua_call_event_hooks(HOOK_ON_EXIT); + if (gDjuiChatBox != NULL) { djui_base_destroy(&gDjuiChatBox->base); gDjuiChatBox = NULL; diff --git a/src/pc/pc_main.c b/src/pc/pc_main.c index c24df7cc..493784c4 100644 --- a/src/pc/pc_main.c +++ b/src/pc/pc_main.c @@ -284,10 +284,7 @@ void audio_shutdown(void) { } void game_deinit(void) { - if (gGameInited) { - smlua_call_event_hooks(HOOK_ON_EXIT); - configfile_save(configfile_name()); - } + if (gGameInited) { configfile_save(configfile_name()); } controller_shutdown(); audio_custom_shutdown(); audio_shutdown();