Fixed RealignFamiliars() -- Caboose wasn't correctly proofed
This commit is contained in:
parent
f064767bad
commit
d5011aabc4
16
main.lua
16
main.lua
|
@ -85,14 +85,16 @@ 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
|
||||||
Caboose = entity
|
if Caboose == nil then
|
||||||
else
|
Caboose = entity
|
||||||
if Caboose.FrameCount < entity.FrameCount then
|
|
||||||
Caboose.Parent = entity
|
|
||||||
entity.Child = Caboose
|
|
||||||
else
|
else
|
||||||
Caboose.Child = entity
|
if Caboose.FrameCount < entity.FrameCount then
|
||||||
entity.Parent = Caboose
|
Caboose.Parent = entity
|
||||||
|
entity.Child = Caboose
|
||||||
|
else
|
||||||
|
Caboose.Child = entity
|
||||||
|
entity.Parent = Caboose
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue