mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-03 19:45:34 +00:00
Fix consecutive dialogue choices
This commit is contained in:
parent
87ce2110dc
commit
51580ead4f
1 changed files with 5 additions and 3 deletions
|
@ -426,6 +426,7 @@ namespace MWDialogue
|
||||||
|
|
||||||
void DialogueManager::questionAnswered (const std::string& answer)
|
void DialogueManager::questionAnswered (const std::string& answer)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (mChoiceMap.find(answer) != mChoiceMap.end())
|
if (mChoiceMap.find(answer) != mChoiceMap.end())
|
||||||
{
|
{
|
||||||
mChoice = mChoiceMap[answer];
|
mChoice = mChoiceMap[answer];
|
||||||
|
@ -442,6 +443,10 @@ namespace MWDialogue
|
||||||
std::string text = info->mResponse;
|
std::string text = info->mResponse;
|
||||||
parseText (text);
|
parseText (text);
|
||||||
|
|
||||||
|
mChoiceMap.clear();
|
||||||
|
mChoice = -1;
|
||||||
|
mIsInChoice = false;
|
||||||
|
|
||||||
MWScript::InterpreterContext interpreterContext(&mActor.getRefData().getLocals(),mActor);
|
MWScript::InterpreterContext interpreterContext(&mActor.getRefData().getLocals(),mActor);
|
||||||
MWBase::Environment::get().getWindowManager()->getDialogueWindow()->addText (Interpreter::fixDefinesDialog(text, interpreterContext));
|
MWBase::Environment::get().getWindowManager()->getDialogueWindow()->addText (Interpreter::fixDefinesDialog(text, interpreterContext));
|
||||||
MWBase::Environment::get().getJournal()->addTopic (mLastTopic, info->mId);
|
MWBase::Environment::get().getJournal()->addTopic (mLastTopic, info->mId);
|
||||||
|
@ -449,9 +454,6 @@ namespace MWDialogue
|
||||||
mLastDialogue = *info;
|
mLastDialogue = *info;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
mChoiceMap.clear();
|
|
||||||
mChoice = -1;
|
|
||||||
mIsInChoice = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
updateTopics();
|
updateTopics();
|
||||||
|
|
Loading…
Reference in a new issue