From 35f683c615b57d7f8e6cdf5add7bb0c9e9236432 Mon Sep 17 00:00:00 2001 From: Robert Beckebans Date: Wed, 19 Jun 2024 22:44:30 +0200 Subject: [PATCH] Allow rbdmap.exe +set fs_game --- neo/tools/compilers/main.cpp | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/neo/tools/compilers/main.cpp b/neo/tools/compilers/main.cpp index 717c0df3..88e55bec 100644 --- a/neo/tools/compilers/main.cpp +++ b/neo/tools/compilers/main.cpp @@ -700,15 +700,29 @@ int main( int argc, char** argv ) cmdSystem->Init(); cvarSystem->Init(); idCVar::RegisterStaticVars(); - fileSystem->Init(); - declManager->InitTool(); + // set cvars before filesystem init to use mod paths idCmdArgs args; for( int i = 0; i < argc; i++ ) { - args.AppendArg( argv[i] ); + if( idStr::Icmp( argv[ i ], "+set" ) == 0 ) + { + if( ( i + 2 ) < argc ) + { + cvarSystem->SetCVarString( argv[ i + 1 ], argv[ i + 2 ] ); + } + + i += 2; + } + else + { + args.AppendArg( argv[i] ); + } } + fileSystem->Init(); + declManager->InitTool(); + Dmap_f( args ); return 0;