From e1da92454d096c28292699f64d891a3af292a204 Mon Sep 17 00:00:00 2001 From: Paweł Redman Date: Thu, 12 Oct 2017 13:20:06 +0200 Subject: Initial work on animations. --- src/world.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/world.cpp') 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 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); -- cgit