PARALLACTION: Flexible monologues in BRA (patch #3021740 by fuzzie)

Some dialogue answers are set to the literal 'null', which is used in NS to
simulate a fixed monologue ('null' instructs the engine to jump to the first
entry in the list of available questions, which is always made of a single
item in this case).
BRA has flexible monologues that depend on the game state, so this patch goes
and checks all the available branches before picking the correct one.

svn-id: r55591
This commit is contained in:
Nicola Mettifogo 2011-01-28 14:19:39 +00:00
parent dd7bc67f82
commit 7760628bdb

View File

@ -252,8 +252,13 @@ void DialogueManager::nextAnswer() {
}
if (!_q->_answers[0]->_text.compareToIgnoreCase("NULL")) {
_answerId = 0;
_state = NEXT_QUESTION;
addVisibleAnswers(_q);
if (_numVisAnswers) {
_answerId = _visAnswers[0]._index;
_state = NEXT_QUESTION;
} else {
_state = DIALOGUE_OVER;
}
return;
}