From 8442ecbb1499b4c22827ab4a46862965a037665b Mon Sep 17 00:00:00 2001 From: Rudolf Polzer Date: Sat, 9 Oct 2010 19:37:43 +0200 Subject: [PATCH] .ase also works from .map! --- tools/quake3/q3map2/convert_map.c | 3 +++ tools/quake3/q3map2/main.c | 6 ++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/tools/quake3/q3map2/convert_map.c b/tools/quake3/q3map2/convert_map.c index 69418854..0f37665d 100644 --- a/tools/quake3/q3map2/convert_map.c +++ b/tools/quake3/q3map2/convert_map.c @@ -493,7 +493,10 @@ static void ConvertBrush( FILE *f, int num, bspBrush_t *brush, vec3_t origin, qb if(strncmp(buildSide->shaderInfo->shader, "textures/common/", 16)) if(strcmp(buildSide->shaderInfo->shader, "noshader")) if(strcmp(buildSide->shaderInfo->shader, "default")) + { fprintf(stderr, "no matching triangle for brushside using %s (hopefully nobody can see this side anyway)\n", buildSide->shaderInfo->shader); + texture = "common/WTF"; + } MakeNormalVectors( buildPlane->normal, vecs[ 0 ], vecs[ 1 ] ); VectorMA( vec3_origin, buildPlane->dist, buildPlane->normal, pts[ 0 ] ); diff --git a/tools/quake3/q3map2/main.c b/tools/quake3/q3map2/main.c index 55147b3a..062e4693 100644 --- a/tools/quake3/q3map2/main.c +++ b/tools/quake3/q3map2/main.c @@ -1508,14 +1508,14 @@ int ConvertBSPMain( int argc, char **argv ) int i; int (*convertFunc)( char * ); game_t *convertGame; - qboolean map_allowed; char ext[1024]; + qboolean map_allowed; /* set default */ convertFunc = ConvertBSPToASE; convertGame = NULL; - map_allowed = qfalse; + map_allowed = qtrue; /* arg checking */ if( argc < 1 ) @@ -1534,6 +1534,7 @@ int ConvertBSPMain( int argc, char **argv ) if( !Q_stricmp( argv[ i ], "ase" ) ) { convertFunc = ConvertBSPToASE; + map_allowed = qtrue; } else if( !Q_stricmp( argv[ i ], "map_bp" ) ) { @@ -1548,6 +1549,7 @@ int ConvertBSPMain( int argc, char **argv ) else { convertGame = GetGame( argv[ i ] ); + map_allowed = qfalse; if( convertGame == NULL ) Sys_Printf( "Unknown conversion format \"%s\". Defaulting to ASE.\n", argv[ i ] ); } -- 2.39.2