Update main.lua

This commit is contained in:
Noah Richardson authored and GitHub committed 2021-11-06 11:52:52 -04:00
1 parent e59d898935
commit 53789bfc2b
1 file changed
+11 -2
+11 -2
View File
@@ -495,6 +495,15 @@ function EID:handleHoverHUD()
return nil return nil
end end
function EID:setPlayer()
local p = Isaac.GetPlayer(0)
if p.SubType == PlayerType.PLAYER_THEFORGOTTEN_B then
EID.player = p:GetOtherTwin()
else
EID.player = p
end
end
--------------------------------------------------------------------------- ---------------------------------------------------------------------------
---------------------------On Update Function------------------------------ ---------------------------On Update Function------------------------------
@@ -504,7 +513,7 @@ EID.pathCheckerEntity = nil
EID.hasValidWalkingpath = true EID.hasValidWalkingpath = true
function EID:onGameUpdate() function EID:onGameUpdate()
EID.player = Isaac.GetPlayer(0) EID:setPlayer()
--Fix Overlapping Pedestals --Fix Overlapping Pedestals
local curPositions = {} local curPositions = {}
for _, entity in ipairs(Isaac.FindByType(5, 100, -1, true, false)) do for _, entity in ipairs(Isaac.FindByType(5, 100, -1, true, false)) do
@@ -581,7 +590,7 @@ local function onRender(t)
EID:renderMCMDummyDescription() EID:renderMCMDummyDescription()
renderAchievementInfo() renderAchievementInfo()
EID.player = Isaac.GetPlayer(0) EID:setPlayer()
if EID.GameVersion == "ab+" then if EID.GameVersion == "ab+" then
if EID.player:HasCollectible(CollectibleType.COLLECTIBLE_SCHOOLBAG) then if EID.player:HasCollectible(CollectibleType.COLLECTIBLE_SCHOOLBAG) then
EID:addTextPosModifier("Schoolbag", Vector(0,30)) EID:addTextPosModifier("Schoolbag", Vector(0,30))