fix: ACTUALLY visible entities :)

This commit is contained in:
cha0s 2019-06-05 20:18:30 -05:00
parent 38a907d9bb
commit 8916544193

View File

@ -181,7 +181,7 @@ export class EntityList extends decorate(class {}) {
if (-1 === entitiesChecked.indexOf(entity)) {
entitiesChecked.push(entity);
// Make sure the AABB is actually in the query due to expansion.
if (Rectangle.intersects(query, aabb)) {
if (entity.isVisible && Rectangle.intersects(query, aabb)) {
entities.push(entity);
}
}