Fixed RealignFamiliars() -- Caboose wasn't correctly proofed
This commit is contained in:
parent
f064767bad
commit
d5011aabc4
2
main.lua
2
main.lua
|
@ -85,6 +85,7 @@ local function RealignFamiliars()
|
||||||
local Caboose = nil
|
local Caboose = nil
|
||||||
for _, entity in pairs(Isaac.GetRoomEntities()) do
|
for _, entity in pairs(Isaac.GetRoomEntities()) do
|
||||||
if entity.Type == EntityType.ENTITY_FAMILIAR and entity.Child == nil then
|
if entity.Type == EntityType.ENTITY_FAMILIAR and entity.Child == nil then
|
||||||
|
if Caboose == nil then
|
||||||
Caboose = entity
|
Caboose = entity
|
||||||
else
|
else
|
||||||
if Caboose.FrameCount < entity.FrameCount then
|
if Caboose.FrameCount < entity.FrameCount then
|
||||||
|
@ -96,6 +97,7 @@ local function RealignFamiliars()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local function FindClosestEnemy( position, distance, validator )
|
local function FindClosestEnemy( position, distance, validator )
|
||||||
|
|
Loading…
Reference in New Issue