]> de.git.xonotic.org Git - xonotic/netradiant.git/commitdiff
warn on wrong -convert use, always allow .map input
authorRudolf Polzer <divverent@alientrap.org>
Sat, 9 Oct 2010 19:54:55 +0000 (21:54 +0200)
committerRudolf Polzer <divverent@alientrap.org>
Sat, 9 Oct 2010 19:54:55 +0000 (21:54 +0200)
tools/quake3/q3map2/main.c

index 0789723d6fe7403ce1d44b96969bccb6da2aa826..acb060ac84201e50fd52ba42bc4da66c0d9ddc87 100644 (file)
@@ -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);