Allow rbdmap.exe +set fs_game <mod_path> <mapname>

This commit is contained in:
Robert Beckebans 2024-06-19 22:44:30 +02:00
parent b01e7b003a
commit 35f683c615

View file

@ -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;