fix(map): completed quest pins stuck on world map until reload (#9)

Draw-queue race: ProcessQueue processes the world-map and minimap queues
independently. When a frame was unloaded while still queued, its
minimap-queue entry could trigger the deferred Unload first (removing
both icons and clearing _needsUnload), then a later map-queue entry
re-added the world-map icon -- orphaned, since Unload had nil'd the
questIdFrames/_G reference, so it lingered until /reload while the
minimap cleared. Unload now drops the frame's pending draw-queue entries
(new QuestieMap:DequeueFrameDrawCalls) so an unloaded frame can never be
re-added to a map.
This commit is contained in:
Xurkon
2026-06-11 07:13:01 -05:00
parent 48a948af72
commit dc155b6583
3 changed files with 30 additions and 0 deletions
+7
View File
@@ -327,8 +327,15 @@ end
function _Qframe:Unload()
if not self._loaded then
self._needsUnload = true
-- Drop any pending draw-queue entries so this frame can't be re-added to a map
-- after it was unloaded while still queued (see DequeueFrameDrawCalls). Without
-- this a completed quest's world-map pin could linger until /reload. (#9)
QuestieMap:DequeueFrameDrawCalls(self)
return -- icon is still in the draw queue
end
-- Even when already loaded, the frame may have been re-queued for a redraw; clear those
-- pending draw calls so they don't re-add the icon after this unload. (#9)
QuestieMap:DequeueFrameDrawCalls(self)
self._needsUnload = nil
self._loaded = nil
--Questie:Debug(Questie.DEBUG_SPAM, "[_Qframe:Unload]")