fix headless servers with mods that access marioObj on load (#37)

This commit is contained in:
Isaac0-dev 2024-05-12 22:58:43 +10:00 committed by GitHub
parent cb6f5f2b30
commit 4fc0cc92e6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 0 deletions

View File

@ -435,6 +435,11 @@ int main(int argc, char *argv[]) {
configNetworkSystem = 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;
extern void djui_panel_do_host(bool reconnecting, bool playSound);
djui_panel_do_host(NULL, false);
} else {