1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-09 03:39:14 +00:00

Reject conditions testing agaist Choice when not currently in a choice (Fixes #3117)

This commit is contained in:
scrawl 2016-01-01 23:55:17 +01:00
parent 0333c40047
commit a9f0f30bb8

View File

@ -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;