From 3af687b28d10a31558d363e2f8e90ac158dbf6f5 Mon Sep 17 00:00:00 2001 From: Sage Vaillancourt Date: Fri, 21 Mar 2025 12:18:33 -0400 Subject: [PATCH] bit.band local in coll. detection --- systems/collision-detection.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/systems/collision-detection.lua b/systems/collision-detection.lua index e75f24e..f0c7613 100644 --- a/systems/collision-detection.lua +++ b/systems/collision-detection.lua @@ -1,4 +1,5 @@ local world = require("world") +local band = bit.band local collidingEntities = world:filteredSystem("collidingEntitites", { position = T.XyPair, @@ -31,7 +32,7 @@ world:filteredSystem( (e ~= collider) and collider.canCollideWith and e.canBeCollidedBy - and bit.band(collider.canCollideWith, e.canBeCollidedBy) ~= 0 + and band(collider.canCollideWith, e.canBeCollidedBy) ~= 0 and intersects(e, collider) then system.world:addEntity({ collisionBetween = { collider = collider, collidedInto = e },