From c8d42bbf204fcf48880925be58ab8f41bc7ff498 Mon Sep 17 00:00:00 2001 From: fgsfds Date: Sun, 7 Jan 2024 22:14:59 +0100 Subject: [PATCH] port: net: if going into netgame from command line, skip intro and default to profile 0 --- port/src/main.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/port/src/main.c b/port/src/main.c index 4e6ebfb15..751070259 100644 --- a/port/src/main.c +++ b/port/src/main.c @@ -137,6 +137,8 @@ int main(int argc, const char **argv) g_StageNum = sysArgGetInt("--boot-stage", STAGE_TITLE); + g_FileAutoSelect = sysArgGetInt("--profile", -1); + if (g_StageNum == STAGE_TITLE && (sysArgCheck("--skip-intro") || g_SkipIntro)) { // shorthand for --boot-stage 0x26 g_StageNum = STAGE_CITRAINING; @@ -145,11 +147,19 @@ int main(int argc, const char **argv) g_StageNum = STAGE_TITLE; } + if (g_NetJoinLatch || g_NetHostLatch) { + if (g_FileAutoSelect < 0) { + // default to profile 0 if going into a net game + g_FileAutoSelect = 0; + } + // skip the intro if going into a net game + g_StageNum = STAGE_CITRAINING; + } + if (g_StageNum != STAGE_TITLE) { sysLogPrintf(LOG_NOTE, "boot stage set to 0x%02x", g_StageNum); } - g_FileAutoSelect = sysArgGetInt("--profile", -1); if (g_FileAutoSelect >= 0) { sysLogPrintf(LOG_NOTE, "player profile set to %d", g_FileAutoSelect); }