From 845a007995757d5288e16a00342afdc597eb2a87 Mon Sep 17 00:00:00 2001 From: Eddoursul Date: Fri, 20 Feb 2026 14:59:37 +0100 Subject: [PATCH] Added a failsafe for cases when Goodbye topic is finished but dialog has not closed for whatever reason --- source/Enderal DLL/src/Patches/DialogueMenuPatch.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/source/Enderal DLL/src/Patches/DialogueMenuPatch.h b/source/Enderal DLL/src/Patches/DialogueMenuPatch.h index 4c19fa1f4..1be2686ab 100644 --- a/source/Enderal DLL/src/Patches/DialogueMenuPatch.h +++ b/source/Enderal DLL/src/Patches/DialogueMenuPatch.h @@ -19,6 +19,15 @@ public: private: RE::UI_MESSAGE_RESULTS ProcessMessageEx(RE::UIMessage& a_message) { + // Unblock Tab if Goodbye response has finished playing (End script has already run at this point). + // A failsafe when Goodbye does not close the dialogue menu. + if (bTabBlocked && a_message.type == RE::UI_MESSAGE_TYPE::kUpdate) { + auto* mtm = RE::MenuTopicManager::GetSingleton(); + if (mtm && mtm->isSayingGoodbye && !mtm->currentTopicInfo && RE::UI::GetSingleton()->IsMenuOpen(MENU_NAME)) { + BlockTab(false); + } + } + if (bTabBlocked && a_message.type == RE::UI_MESSAGE_TYPE::kScaleformEvent) { RE::BSUIScaleformData* data = static_cast(a_message.data); @@ -37,7 +46,7 @@ private: } } } - + return _ProcessMessageFn(this, a_message); }