diff --git a/systems/collision-detection.lua b/systems/collision-detection.lua index 339309b..e75f24e 100644 --- a/systems/collision-detection.lua +++ b/systems/collision-detection.lua @@ -32,15 +32,10 @@ world:filteredSystem( and collider.canCollideWith and e.canBeCollidedBy and bit.band(collider.canCollideWith, e.canBeCollidedBy) ~= 0 - then - if intersects(e, collider) then + and intersects(e, collider) then system.world:addEntity({ - collisionBetween = { - collider = collider, - collidedInto = e, - }, + collisionBetween = { collider = collider, collidedInto = e }, }) - end end end end