mirror of
https://github.com/bryanthaboi/gen1recomp.git
synced 2026-08-16 08:11:35 +02:00
yellow alpha
This commit is contained in:
@@ -15,9 +15,11 @@ end
|
||||
|
||||
-- entities: array of anything with cellX/cellY (and optional targetX/targetY
|
||||
-- while mid-step, so nobody walks into a cell being entered).
|
||||
-- e.passable entities never block (Yellow's companion Pikachu: the player
|
||||
-- walks straight through and it re-trails, pikachu_follow.asm).
|
||||
function Collision.occupied(entities, cx, cy, ignore)
|
||||
for _, e in ipairs(entities) do
|
||||
if e ~= ignore then
|
||||
if e ~= ignore and not e.passable then
|
||||
if (e.cellX == cx and e.cellY == cy) or
|
||||
(e.targetX == cx and e.targetY == cy) then
|
||||
return e
|
||||
|
||||
Reference in New Issue
Block a user