summaryrefslogtreecommitdiff
path: root/src/world.cpp
diff options
context:
space:
mode:
authorPaweł Redman <pawel.redman@gmail.com>2017-12-13 16:27:34 +0100
committerPaweł Redman <pawel.redman@gmail.com>2017-12-13 16:30:24 +0100
commitb3b30521e50f1ed0046091b316b19daec646b4ac (patch)
tree94da0045602da71c5c76b692f4ea4e8c510ca4b7 /src/world.cpp
parent15f4780dd94a06bec5616155c05810c731d2e4af (diff)
Basic alien AI.
Diffstat (limited to 'src/world.cpp')
-rw-r--r--src/world.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/world.cpp b/src/world.cpp
index f4aca63..71a7ae7 100644
--- a/src/world.cpp
+++ b/src/world.cpp
@@ -162,9 +162,10 @@ std::list<sector_t*> world_t::get_sectors(rectf_t rect)
return list;
}
+static size_t cookie = 0;
+
std::list<entity_t*> world_t::get_entities(rectf_t rect, cflags_t cflags)
{
- static size_t cookie = 0;
std::list<entity_t*> list;
cookie++;
@@ -190,7 +191,6 @@ std::list<entity_t*> world_t::get_entities(rectf_t rect, cflags_t cflags)
std::list<entity_t*> world_t::get_render_entities(rectf_t rect)
{
- static size_t cookie = 0;
std::list<entity_t*> list;
cookie++;
@@ -213,8 +213,6 @@ std::list<entity_t*> world_t::get_render_entities(rectf_t rect)
bool world_t::test_rect(const cmodel_t *cmodel, const entity_t *ignore)
{
- static size_t cookie = 0;
-
cookie++;
for (sector_t *sector : get_sectors(cmodel->bounds)) {