From: Rudolf Polzer Date: Sat, 9 Oct 2010 19:54:55 +0000 (+0200) Subject: warn on wrong -convert use, always allow .map input X-Git-Tag: xonotic-v0.5.0~181 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=05b62ff70fbb4edb73e2280793cac30407e203d5;p=xonotic%2Fnetradiant.git warn on wrong -convert use, always allow .map input --- diff --git a/tools/quake3/q3map2/main.c b/tools/quake3/q3map2/main.c index 0789723d..acb060ac 100644 --- a/tools/quake3/q3map2/main.c +++ b/tools/quake3/q3map2/main.c @@ -1550,7 +1550,7 @@ int ConvertBSPMain( int argc, char **argv ) if( !Q_stricmp( argv[ i ], "ase" ) ) { convertFunc = ConvertBSPToASE; - map_allowed = qtrue; + map_allowed = qfalse; } else if( !Q_stricmp( argv[ i ], "map_bp" ) ) { @@ -1565,7 +1565,7 @@ int ConvertBSPMain( int argc, char **argv ) else { convertGame = GetGame( argv[ i ] ); - map_allowed = qtrue; + map_allowed = qfalse; if( convertGame == NULL ) Sys_Printf( "Unknown conversion format \"%s\". Defaulting to ASE.\n", argv[ i ] ); } @@ -1591,8 +1591,10 @@ int ConvertBSPMain( int argc, char **argv ) /* clean up map name */ strcpy(source, ExpandArg(argv[i])); ExtractFileExtension(source, ext); - if(!Q_stricmp(ext, "map") && map_allowed) + if(!Q_stricmp(ext, "map")) { + if(!map_allowed) + Sys_Printf("WARNING: the requested conversion should not be done from .map files. Compile a .bsp first.\n"); StripExtension(source); DefaultExtension(source, ".map"); Sys_Printf("Loading %s\n", source);