From e36571c70ca3abb639ef64bf6f5c924ca19e4ffa Mon Sep 17 00:00:00 2001 From: Paweł Redman Date: Tue, 20 Dec 2016 12:41:28 +0100 Subject: Implement map postprocessing fully. Postprocessing removes info_* and team_* entities from all maps but the master (the first one in the command line) and (optionally) prefixes all targets and targetnames with a prefix (set by mapcat_prefix in the master worldspawn). --- src/main.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/main.c') diff --git a/src/main.c b/src/main.c index 1b903d6..838afb5 100644 --- a/src/main.c +++ b/src/main.c @@ -108,7 +108,7 @@ int main(int argc, char **argv) map_init(&map); - elist_for (input, inputs, list) { + elist_for(input, inputs, list) { map_t part; map_init(&part); @@ -121,6 +121,13 @@ int main(int argc, char **argv) if (!quiet) map_print_stats(input->path, &part); + // team_* and info_* ents are kept only in the first part + if (map_postprocess(&part, (input != inputs))) { + map_free(&map); + map_free(&part); + goto out; + } + if (map_merge(&map, &part)) { error("error: couldn't merge %s into %s\n", input->path, output); -- cgit