From 12ee42c6f3b636da958d7039024cdf728288af3c Mon Sep 17 00:00:00 2001 From: Frederic Chardon Date: Tue, 28 Jul 2020 20:50:49 +0000 Subject: [PATCH] Update mLastTopic before executing scripts. In case the script contains ClearInfoActor it erase not the correct topic. Other correction not linked with the bug: - reset mActorKnownTopicsFlag at the same time as mActorKnownTopics - don't call updateTopics in addResponse, it is already handled by the response callback --- CHANGELOG.md | 1 + apps/openmw/mwdialogue/dialoguemanagerimp.cpp | 6 ++++-- apps/openmw/mwgui/dialogue.cpp | 1 - 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d4fae3d26..321eb3c0c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -41,6 +41,7 @@ Bug #5502: Dead zone for analogue stick movement is too small Bug #5507: Sound volume is not clamped on ingame settings update Bug #5531: Actors flee using current rotation by axis x + Bug #5548: Certain exhausted topics can be highlighted again even though there's no new dialogue Feature #390: 3rd person look "over the shoulder" Feature #2386: Distant Statics in the form of Object Paging Feature #5297: Add a search function to the "Datafiles" tab of the OpenMW launcher diff --git a/apps/openmw/mwdialogue/dialoguemanagerimp.cpp b/apps/openmw/mwdialogue/dialoguemanagerimp.cpp index 3e0cbbad2..e3f1796a4 100644 --- a/apps/openmw/mwdialogue/dialoguemanagerimp.cpp +++ b/apps/openmw/mwdialogue/dialoguemanagerimp.cpp @@ -121,6 +121,7 @@ namespace MWDialogue mTalkedTo = creatureStats.hasTalkedToPlayer(); mActorKnownTopics.clear(); + mActorKnownTopicsFlag.clear(); //greeting const MWWorld::Store &dialogs = @@ -300,11 +301,11 @@ namespace MWDialogue } } + mLastTopic = topic; + executeScript (info->mResultScript, mActor); parseText (info->mResponse); - - mLastTopic = topic; } } @@ -323,6 +324,7 @@ namespace MWDialogue updateGlobals(); mActorKnownTopics.clear(); + mActorKnownTopicsFlag.clear(); const auto& dialogs = MWBase::Environment::get().getWorld()->getStore().get(); diff --git a/apps/openmw/mwgui/dialogue.cpp b/apps/openmw/mwgui/dialogue.cpp index a674dd36e..2527da374 100644 --- a/apps/openmw/mwgui/dialogue.cpp +++ b/apps/openmw/mwgui/dialogue.cpp @@ -678,7 +678,6 @@ namespace MWGui { mHistoryContents.push_back(new Response(text, title, needMargin)); updateHistory(); - updateTopics(); } void DialogueWindow::addMessageBox(const std::string& text)