forked from teamnwah/openmw-tes3coop
Make Goodbye and Choice choices mutually exclusive
This commit is contained in:
parent
53e8882366
commit
11103211c5
1 changed files with 7 additions and 5 deletions
|
@ -430,11 +430,13 @@ namespace MWDialogue
|
||||||
}
|
}
|
||||||
|
|
||||||
void DialogueManager::addChoice (const std::string& text, int choice)
|
void DialogueManager::addChoice (const std::string& text, int choice)
|
||||||
|
{
|
||||||
|
if (!mGoodbye)
|
||||||
{
|
{
|
||||||
mIsInChoice = true;
|
mIsInChoice = true;
|
||||||
|
|
||||||
mChoices.push_back(std::make_pair(text, choice));
|
mChoices.push_back(std::make_pair(text, choice));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const std::vector<std::pair<std::string, int> >& DialogueManager::getChoices()
|
const std::vector<std::pair<std::string, int> >& DialogueManager::getChoices()
|
||||||
{
|
{
|
||||||
|
@ -448,7 +450,7 @@ namespace MWDialogue
|
||||||
|
|
||||||
void DialogueManager::goodbye()
|
void DialogueManager::goodbye()
|
||||||
{
|
{
|
||||||
mIsInChoice = false;
|
if (!mIsInChoice)
|
||||||
mGoodbye = true;
|
mGoodbye = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue