diff --git a/libultraship/libultraship/SohImGuiImpl.cpp b/libultraship/libultraship/SohImGuiImpl.cpp index 56b698c1a..12cf8ca6e 100644 --- a/libultraship/libultraship/SohImGuiImpl.cpp +++ b/libultraship/libultraship/SohImGuiImpl.cpp @@ -1047,7 +1047,7 @@ namespace SohImGui { CVar_SetS32("gDisableKokiriDrawDistance", 0); } else if (CVar_GetS32("gDisableDrawDistance", 0) == 1) { EnhancementCheckbox("Kokiri Draw Distance", "gDisableKokiriDrawDistance"); - Tooltip("Kokiris are mystical being that appear from a certain distance\nEnable this will remove their draw distance\nNeeds to reload the map to take effect"); + Tooltip("Kokiris are mystical being that appear from a certain distance\nEnable this will remove their draw distance"); } ImGui::EndMenu(); diff --git a/soh/src/overlays/actors/ovl_En_Ko/z_en_ko.c b/soh/src/overlays/actors/ovl_En_Ko/z_en_ko.c index 27b118879..c5e862c69 100644 --- a/soh/src/overlays/actors/ovl_En_Ko/z_en_ko.c +++ b/soh/src/overlays/actors/ovl_En_Ko/z_en_ko.c @@ -1053,7 +1053,7 @@ void func_80A98CD8(EnKo* this) { this->actor.targetMode = info->targetMode; this->lookDist = info->lookDist; this->lookDist += this->collider.dim.radius; - this->appearDist = CVar_GetS32("gDisableKokiriDrawDistance", 0) != 0 ? 32767 : info->appearDist; + this->appearDist = info->appearDist; } // Used to fetch actor animation? @@ -1080,7 +1080,15 @@ void func_80A98DB4(EnKo* this, GlobalContext* globalCtx) { dist = this->actor.xzDistToPlayer; } - Math_SmoothStepToF(&this->modelAlpha, (this->appearDist < dist) ? 0.0f : 255.0f, 0.3f, 40.0f, 1.0f); + if (CVar_GetS32("gDisableKokiriDrawDistance", 0) != 0) { + this->appearDist = 32767.0f; + Math_SmoothStepToF(&this->modelAlpha, (this->appearDist < dist) ? 0.0f : 255.0f, 0.3f, 40.0f, 1.0f); + f32 test = this->appearDist; + } else { + this->appearDist = 180.0f; + Math_SmoothStepToF(&this->modelAlpha, (this->appearDist < dist) ? 0.0f : 255.0f, 0.3f, 40.0f, 1.0f); + } + if (this->modelAlpha < 10.0f) { this->actor.flags &= ~ACTOR_FLAG_0; } else { diff --git a/soh/src/overlays/actors/ovl_En_Md/z_en_md.c b/soh/src/overlays/actors/ovl_En_Md/z_en_md.c index 38fdd8bfa..54103ba59 100644 --- a/soh/src/overlays/actors/ovl_En_Md/z_en_md.c +++ b/soh/src/overlays/actors/ovl_En_Md/z_en_md.c @@ -613,10 +613,18 @@ void func_80AAB5A4(EnMd* this, GlobalContext* globalCtx) { f32 temp; if (globalCtx->sceneNum != SCENE_KOKIRI_HOME4) { - temp = (CHECK_QUEST_ITEM(QUEST_KOKIRI_EMERALD) && !(gSaveContext.eventChkInf[1] & 0x1000) && - (globalCtx->sceneNum == SCENE_SPOT04)) - ? 100.0f - : 400.0f; + if (CVar_GetS32("gDisableKokiriDrawDistance", 0) != 0) { + temp = (CHECK_QUEST_ITEM(QUEST_KOKIRI_EMERALD) && !(gSaveContext.eventChkInf[1] & 0x1000) && + (globalCtx->sceneNum == SCENE_SPOT04)) + ? 100.0f + : 32767.0f; + } else { + temp = (CHECK_QUEST_ITEM(QUEST_KOKIRI_EMERALD) && !(gSaveContext.eventChkInf[1] & 0x1000) && + (globalCtx->sceneNum == SCENE_SPOT04)) + ? 100.0f + : 400.0f; + } + this->alpha = func_80034DD4(&this->actor, globalCtx, this->alpha, temp); this->actor.shape.shadowAlpha = this->alpha; } else { diff --git a/soh/src/overlays/actors/ovl_En_Sa/z_en_sa.c b/soh/src/overlays/actors/ovl_En_Sa/z_en_sa.c index f91bc16ae..ade63e3e6 100644 --- a/soh/src/overlays/actors/ovl_En_Sa/z_en_sa.c +++ b/soh/src/overlays/actors/ovl_En_Sa/z_en_sa.c @@ -727,7 +727,12 @@ void EnSa_Update(Actor* thisx, GlobalContext* globalCtx) { } if (this->actionFunc != func_80AF68E4) { - this->alpha = func_80034DD4(&this->actor, globalCtx, this->alpha, 400.0f); + if (CVar_GetS32("gDisableKokiriDrawDistance", 0) != 0) { + this->alpha = func_80034DD4(&this->actor, globalCtx, this->alpha, 32767); + } + else { + this->alpha = func_80034DD4(&this->actor, globalCtx, this->alpha, 400.0f); + } } else { this->alpha = 255; }