From 4bcce46a595058dfc79e0f7b908f7420e70a1206 Mon Sep 17 00:00:00 2001 From: Garux Date: Tue, 30 Jun 2020 13:15:10 +0300 Subject: [PATCH] q3map2: -onlyents: support *.ent as map file param --- tools/quake3/q3map2/bsp.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/quake3/q3map2/bsp.c b/tools/quake3/q3map2/bsp.c index 071f2559..db0d4a8b 100644 --- a/tools/quake3/q3map2/bsp.c +++ b/tools/quake3/q3map2/bsp.c @@ -1034,7 +1034,9 @@ int BSPMain( int argc, char **argv ){ /* if we are doing a full map, delete the last saved region map */ sprintf( path, "%s.reg", source ); remove( path ); - path_set_extension( name, ".map" ); /* might be .reg */ + if ( !onlyents || !striEqual( path_get_filename_base_end( name ), ".ent" ) ) { + path_set_extension( name, ".map" ); /* .reg and .ent are ok too */ + } } /* if onlyents, just grab the entites and resave */