From 74dd416749941ffa9a74a458bd441924fa5b6b89 Mon Sep 17 00:00:00 2001 From: Agent X <44549182+Agent-11@users.noreply.github.com> Date: Sat, 9 Mar 2024 21:35:54 -0500 Subject: [PATCH] FINALLY fix --server --- src/pc/pc_main.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/src/pc/pc_main.c b/src/pc/pc_main.c index 58b25324..00761226 100644 --- a/src/pc/pc_main.c +++ b/src/pc/pc_main.c @@ -331,6 +331,7 @@ void* main_game_init(UNUSED void* arg) { gGameInited = true; } +extern void djui_panel_do_host(bool reconnecting); int main(int argc, char *argv[]) { // Handle terminal arguments @@ -385,15 +386,7 @@ int main(int argc, char *argv[]) { } else if (gCLIOpts.Network == NT_SERVER) { network_set_system(NS_SOCKET); configHostPort = gCLIOpts.NetworkPort; - - // Horrible, hacky fix for mods that access marioObj straight away - // best fix: host with the standard main menu method - static struct Object sHackyObject = { 0 }; - gMarioStates[0].marioObj = &sHackyObject; - - network_init(NT_SERVER, false); - djui_panel_shutdown(); - djui_panel_modlist_create(NULL); + djui_panel_do_host(NULL); } else { network_init(NT_NONE, false); }