summaryrefslogtreecommitdiff
path: root/src/world.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/world.cpp')
-rw-r--r--src/world.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/world.cpp b/src/world.cpp
index 7256aee..5c2d7b3 100644
--- a/src/world.cpp
+++ b/src/world.cpp
@@ -47,6 +47,9 @@ void world_t::generate(sector_t *sector, sector_index_t index, bool partial)
sector->empty = false;
generator(this, index, sector, gen_tiles, gen_decos, generator_data);
+ stats.sectors++;
+ stats.tiles += SECTOR_SIZE * SECTOR_SIZE;
+
// Unused, for now.
/*
for (coord_t ly = 0; ly < SECTOR_SIZE; ly++)
@@ -368,12 +371,6 @@ trace_t trace_cmodel(v2f_t start, v2f_t end, const cmodel_t *cmodel)
return {0};
}
-void world_t::debug_point(sf::Vector2f point)
-{
- sector_index_t index = sector_index_at(point);
- printf("sector (%zd, %zd)\n", index[0], index[1]);
-}
-
entity_t::entity_t(int type_)
{
type = type_;
@@ -429,6 +426,8 @@ void entity_t::link(world_t *world_)
sector = world->get_sector(index);
link_to_sector(sector);
}
+
+ world->stats.entities++;
}
void entity_t::unlink(void)
@@ -444,6 +443,7 @@ void entity_t::unlink(void)
}
parents.clear();
+ world->stats.entities--;
world = 0;
}