Fix nested if in collision-detection

This commit is contained in:
Sage Vaillancourt 2025-03-21 12:17:39 -04:00
parent 64a9dbc148
commit a058d7f9b1
1 changed files with 2 additions and 7 deletions

View File

@ -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