From 627d3f1545264bb00fcc380b1ed0d978ef3f46ea Mon Sep 17 00:00:00 2001 From: Paweł Redman Date: Tue, 20 Dec 2016 12:50:17 +0100 Subject: Fix incorrect values in map_print_stats. --- src/main.c | 6 +++--- src/mapcat.c | 5 ++++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/main.c b/src/main.c index 838afb5..4778b51 100644 --- a/src/main.c +++ b/src/main.c @@ -118,9 +118,6 @@ int main(int argc, char **argv) goto out; } - 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); @@ -128,6 +125,9 @@ int main(int argc, char **argv) goto out; } + if (!quiet) + map_print_stats(input->path, &part); + if (map_merge(&map, &part)) { error("error: couldn't merge %s into %s\n", input->path, output); diff --git a/src/mapcat.c b/src/mapcat.c index 7968586..12a464c 100644 --- a/src/mapcat.c +++ b/src/mapcat.c @@ -408,8 +408,10 @@ no_brushes: } map->worldspawn = entity; - } else + } else { elist_append(&map->entities, entity, list); + map->num_entities++; + } return 0; error: @@ -633,6 +635,7 @@ int map_postprocess(map_t *map, bool filter_team_ents) strncmp(entity->classname, "info_", 5)) continue; + map->num_entities--; map->num_discarded_entities++; elist_unlink(&map->entities, entity, list); free_entity(entity); -- cgit