summaryrefslogtreecommitdiff
path: root/src/world.cpp
diff options
context:
space:
mode:
authorPaweł Redman <pawel.redman@gmail.com>2017-10-12 13:20:06 +0200
committerPaweł Redman <pawel.redman@gmail.com>2017-10-14 12:42:09 +0200
commite1da92454d096c28292699f64d891a3af292a204 (patch)
treedb84ed861a55e6c4f61c7090c19d6f0e41b6cec5 /src/world.cpp
parent753f71536339b78c49468ba6452c96d6b3c345b2 (diff)
Initial work on animations.
Diffstat (limited to 'src/world.cpp')
-rw-r--r--src/world.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/world.cpp b/src/world.cpp
index 9085b16..71098c6 100644
--- a/src/world.cpp
+++ b/src/world.cpp
@@ -131,6 +131,10 @@ std::list<entity_t*> world_t::get_entities(sf::FloatRect rect)
for (entity_t *ent : sector->ents) {
if (ent->cookie == cookie)
continue;
+
+ if (!rect.intersects(ent->bounds))
+ continue;
+
ent->cookie = cookie;
list.push_back(ent);