From b6230bd31f2e2986465a274f2b64c926e72e0db1 Mon Sep 17 00:00:00 2001 From: scrawl Date: Sat, 11 Jun 2016 18:09:02 +0200 Subject: [PATCH] Reject weather dialogue conditions when in an interior cell (Fixes #3437) --- apps/openmw/mwdialogue/filter.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/apps/openmw/mwdialogue/filter.cpp b/apps/openmw/mwdialogue/filter.cpp index 042f41f14..9f31fdda6 100644 --- a/apps/openmw/mwdialogue/filter.cpp +++ b/apps/openmw/mwdialogue/filter.cpp @@ -169,6 +169,11 @@ bool MWDialogue::Filter::testSelectStruct (const SelectWrapper& select) const // If not currently in a choice, we reject all conditions that test against choices. return false; + if (select.getFunction() == SelectWrapper::Function_Weather && !(MWBase::Environment::get().getWorld()->isCellExterior() || MWBase::Environment::get().getWorld()->isCellQuasiExterior())) + // Reject weather conditions in interior cells + // Note that the original engine doesn't include the "|| isCellQuasiExterior()" check, which could be considered a bug. + return false; + switch (select.getType()) { case SelectWrapper::Type_None: return true;