From a9f0f30bb879a2197d9abc9f65d74673bead6e51 Mon Sep 17 00:00:00 2001 From: scrawl Date: Fri, 1 Jan 2016 23:55:17 +0100 Subject: [PATCH] Reject conditions testing agaist Choice when not currently in a choice (Fixes #3117) --- apps/openmw/mwdialogue/filter.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/apps/openmw/mwdialogue/filter.cpp b/apps/openmw/mwdialogue/filter.cpp index ce07593e6..69df38ccf 100644 --- a/apps/openmw/mwdialogue/filter.cpp +++ b/apps/openmw/mwdialogue/filter.cpp @@ -155,10 +155,13 @@ bool MWDialogue::Filter::testDisposition (const ESM::DialInfo& info, bool invert bool MWDialogue::Filter::testSelectStruct (const SelectWrapper& select) const { if (select.isNpcOnly() && (mActor.getTypeName() != typeid (ESM::NPC).name())) - // If the actor is a creature, we do not test the conditions applicable - // only to NPCs. + // If the actor is a creature, we pass all conditions only applicable to NPCs. return true; + if (select.getFunction() == SelectWrapper::Function_Choice && mChoice == -1) + // If not currently in a choice, we reject all conditions that test against choices. + return false; + switch (select.getType()) { case SelectWrapper::Type_None: return true;