diff --git a/soh/soh/Enhancements/game-interactor/GameInteractor_Anchor.cpp b/soh/soh/Enhancements/game-interactor/GameInteractor_Anchor.cpp index 8b2b7ed31cc..76b2f25a1c1 100644 --- a/soh/soh/Enhancements/game-interactor/GameInteractor_Anchor.cpp +++ b/soh/soh/Enhancements/game-interactor/GameInteractor_Anchor.cpp @@ -587,6 +587,15 @@ uint8_t Anchor_GetClientScene(uint32_t fairyIndex) { return GameInteractorAnchor::AnchorClients[clientId].scene; } +uint8_t Anchor_GetClientRoomIndex(uint32_t fairyIndex) { + uint32_t clientId = GameInteractorAnchor::FairyIndexToClientId[fairyIndex]; + if (GameInteractorAnchor::AnchorClients.find(clientId) == GameInteractorAnchor::AnchorClients.end()) { + return 0xFF; + } + + return GameInteractorAnchor::AnchorClients[clientId].roomIndex; +} + PlayerData Anchor_GetClientPlayerData(uint32_t puppetIndex) { uint32_t clientId = GameInteractorAnchor::FairyIndexToClientId[puppetIndex]; if (GameInteractorAnchor::AnchorClients.find(clientId) == GameInteractorAnchor::AnchorClients.end()) { diff --git a/soh/soh/Enhancements/game-interactor/GameInteractor_Anchor.h b/soh/soh/Enhancements/game-interactor/GameInteractor_Anchor.h index 722f365d69b..6e7414a8f59 100644 --- a/soh/soh/Enhancements/game-interactor/GameInteractor_Anchor.h +++ b/soh/soh/Enhancements/game-interactor/GameInteractor_Anchor.h @@ -82,6 +82,7 @@ void Anchor_RegisterHooks(); void Anchor_PushSaveStateToRemote(); void Anchor_RequestSaveStateFromRemote(); uint8_t Anchor_GetClientScene(uint32_t fairyIndex); +uint8_t Anchor_GetClientRoomIndex(uint32_t fairyIndex); Vec3s* Anchor_GetClientJointTable(uint32_t puppetIndex); PlayerData Anchor_GetClientPlayerData(uint32_t puppetIndex); PosRot Anchor_GetClientPosition(uint32_t fairyIndex); diff --git a/soh/src/code/z_map_exp.c b/soh/src/code/z_map_exp.c index 9556b999e37..69b5c58d5b2 100644 --- a/soh/src/code/z_map_exp.c +++ b/soh/src/code/z_map_exp.c @@ -735,8 +735,8 @@ void Minimap_DrawCompassIcons(PlayState* play) { // Other Anchor Players Arrow Actor* actor = gPlayState->actorCtx.actorLists[ACTORCAT_ITEMACTION].head; while (actor != NULL) { - if (gEnLinkPuppetId == actor->id) { - if (actor->world.pos.x != -9999.0) { + if (gEnLinkPuppetId == actor->id && Anchor_GetClientRoomIndex(actor->params - 3) == gPlayState->roomCtx.curRoom.num) { + if (actor->world.pos.x != -9999.0 && Anchor_GetClientScene(actor->params - 3) == gPlayState->sceneNum) { Color_RGB8 playerColor = Anchor_GetClientColor(actor->params - 3); tempX = actor->world.pos.x;