bit.band local in coll. detection
This commit is contained in:
parent
a058d7f9b1
commit
3af687b28d
|
@ -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 },
|
||||
|
|
Loading…
Reference in New Issue