From 53789bfc2b2fd3f65878f5c6502e91acf1266cd9 Mon Sep 17 00:00:00 2001 From: Noah Richardson Date: Sat, 6 Nov 2021 11:52:52 -0400 Subject: [PATCH] Update main.lua --- main.lua | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/main.lua b/main.lua index 058176af..f8d21582 100644 --- a/main.lua +++ b/main.lua @@ -495,6 +495,15 @@ function EID:handleHoverHUD() return nil 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------------------------------ @@ -504,7 +513,7 @@ EID.pathCheckerEntity = nil EID.hasValidWalkingpath = true function EID:onGameUpdate() - EID.player = Isaac.GetPlayer(0) + EID:setPlayer() --Fix Overlapping Pedestals local curPositions = {} for _, entity in ipairs(Isaac.FindByType(5, 100, -1, true, false)) do @@ -581,7 +590,7 @@ local function onRender(t) EID:renderMCMDummyDescription() renderAchievementInfo() - EID.player = Isaac.GetPlayer(0) + EID:setPlayer() if EID.GameVersion == "ab+" then if EID.player:HasCollectible(CollectibleType.COLLECTIBLE_SCHOOLBAG) then EID:addTextPosModifier("Schoolbag", Vector(0,30)) @@ -829,4 +838,4 @@ end if enableDebug then require("eid_debugging") -end \ No newline at end of file +end