summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaweł Redman <pawel.redman@gmail.com>2016-12-20 12:50:17 +0100
committerPaweł Redman <pawel.redman@gmail.com>2016-12-20 12:50:17 +0100
commit627d3f1545264bb00fcc380b1ed0d978ef3f46ea (patch)
treec3d9095683a2d3678ae44bf20fc1ea29bf9e3ef2
parente36571c70ca3abb639ef64bf6f5c924ca19e4ffa (diff)
Fix incorrect values in map_print_stats.
-rw-r--r--src/main.c6
-rw-r--r--src/mapcat.c5
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);