From 803904d6baaef7275020e8015db485bd3287d702 Mon Sep 17 00:00:00 2001 From: Xurkon Date: Fri, 12 Jun 2026 18:00:25 -0500 Subject: [PATCH] fix: prevent minimap fade from hiding icons --- CHANGELOG.md | 1 + Modules/Map/QuestieMap.lua | 15 +++++++++++---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 11002f4..f36b18f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -41,6 +41,7 @@ ### Bug Fixes +- **[Map - Minimap Fade No Longer Hides Icons]** (#17) Distance-based minimap fading now clamps to the configured faded-icon opacity floor instead of reaching 0 alpha. The fade distance can visually de-emphasize distant icons, but only the range cutoff can remove them from the minimap. - **[Regression Tests - Learner Spawn And Tooltip Fallback]** Fixed the two previously failing specs: AscensionDB-owned NPC spawn overrides now keep their curated coordinates even in learner mode, preventing stale learner zones from leaking wrong-corner pins; and NPC quest-start tooltip fallback now calls `QuestieDB:GetQuest` correctly so objective summary text appears when no live objective tooltip is registered. - **[Performance - Minimap Filter And Learner Kill Hot Paths]** (#20) Reduced two likely stutter sources introduced after 1.6.2: minimap fade passes now cache expensive quest-filter visibility checks for already-visible icons instead of re-running them every 0.1s per icon, while still forcing a fresh check before hidden icons reappear; and the learner kill path no longer runs the spawn-evidence merge scan before the merger's three-evidence minimum can succeed. - **[Map Tooltip - Objective Progress Refresh]** (#18) Minimap and world-map objective pin tooltips now refresh the underlying objective before rendering progress text, so kill counters update on hover instead of staying at the count captured when the pin was drawn. diff --git a/Modules/Map/QuestieMap.lua b/Modules/Map/QuestieMap.lua index ebff74e..5d94419 100644 --- a/Modules/Map/QuestieMap.lua +++ b/Modules/Map/QuestieMap.lua @@ -79,6 +79,15 @@ local function _ShouldMinimapIconBeHidden(icon, forceRefresh) return icon._lastShouldBeHiddenResult end +local function _GetMinimapDistanceFade(distance, profile) + local fade = 1 - (math.min(fadeOverDistance, (distance - profile.fadeLevel)) * normalizedValue) + local minimumFade = profile.iconFadeLevel or 0.3 + if fade < minimumFade then + return minimumFade + end + return fade +end + local isDrawQueueDisabled = false --* TODO: How the frames are handled needs to be reworked, why are we getting them from _G @@ -733,8 +742,7 @@ function QuestieMap:DrawManualIcon(data, areaID, x, y, typ) self:FakeShow() end elseif (distance > profile.fadeLevel) then - local fade = 1 - (math.min(10, (distance - profile.fadeLevel)) * normalizedValue) - self:SetFade(fade) + self:SetFade(_GetMinimapDistanceFade(distance, profile)) elseif (distance < profile.fadeOverPlayerDistance) and profile.fadeOverPlayer then local fadeAmount = profile.fadeOverPlayerLevel + distance * (1 - profile.fadeOverPlayerLevel) / profile.fadeOverPlayerDistance if self.faded and fadeAmount > profile.iconFadeLevel then @@ -911,8 +919,7 @@ function QuestieMap:DrawWorldIcon(data, areaID, x, y, showFlag) self:FakeShow() end elseif (distance > profile.fadeLevel) then - local fade = 1 - (math.min(10, (distance - profile.fadeLevel)) * normalizedValue); - self:SetFade(fade) + self:SetFade(_GetMinimapDistanceFade(distance, profile)) elseif (distance < profile.fadeOverPlayerDistance) and profile.fadeOverPlayer then local fadeAmount = profile.fadeOverPlayerLevel + distance * (1 - profile.fadeOverPlayerLevel) / profile.fadeOverPlayerDistance if self.faded and fadeAmount > profile.iconFadeLevel then