From 3aaf167d6b40a790ed8a5db6b36682fabe07ec07 Mon Sep 17 00:00:00 2001 From: helixhorned Date: Fri, 8 Aug 2014 20:02:56 +0000 Subject: [PATCH] game.c: fix -game_dir and -j by moving G_ExtInit() after G_CheckCommandLine(). git-svn-id: https://svn.eduke32.com/eduke32@4571 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/source/game.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/polymer/eduke32/source/game.c b/polymer/eduke32/source/game.c index 40b5ed45b..706a416a8 100644 --- a/polymer/eduke32/source/game.c +++ b/polymer/eduke32/source/game.c @@ -11156,8 +11156,6 @@ int32_t app_main(int32_t argc, const char **argv) if (!usecwd) G_AddSearchPaths(); - G_ExtInit(); - g_numSkills = 4; ud.multimode = 1; @@ -11165,11 +11163,16 @@ int32_t app_main(int32_t argc, const char **argv) G_AddDef("duke3d-android.def"); #endif - // this needs to happen before G_CheckCommandLine because G_GameExit accesses g_player[0] + // This needs to happen before G_CheckCommandLine() because G_GameExit() + // accesses g_player[0]. G_MaybeAllocPlayer(0); G_CheckCommandLine(argc,argv); + // This needs to happen afterwards, as G_CheckCommandLine() is where we set + // up the command-line-provided search paths (duh). + G_ExtInit(); + #if defined(RENDERTYPEWIN) && defined(USE_OPENGL) if (forcegl) initprintf("GL driver blacklist disabled.\n"); #endif