[Scummvm-cvs-logs] SF.net SVN: scummvm:[55603] scummvm/trunk/engines/parallaction/dialogue.cpp
peres001 at users.sourceforge.net
peres001 at users.sourceforge.net
Sat Jan 29 08:20:57 CET 2011
Revision: 55603
http://scummvm.svn.sourceforge.net/scummvm/?rev=55603&view=rev
Author: peres001
Date: 2011-01-29 07:20:57 +0000 (Sat, 29 Jan 2011)
Log Message:
-----------
PARALLACTION: Don't show 'null' answers in dialogues.
Skip a 'runanswer' state when the text of the only answer available is 'null'.
Modified Paths:
--------------
scummvm/trunk/engines/parallaction/dialogue.cpp
Modified: scummvm/trunk/engines/parallaction/dialogue.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/dialogue.cpp 2011-01-29 07:20:42 UTC (rev 55602)
+++ scummvm/trunk/engines/parallaction/dialogue.cpp 2011-01-29 07:20:57 UTC (rev 55603)
@@ -281,18 +281,20 @@
return;
}
- if (!_q->_answers[0]->_text.compareToIgnoreCase("NULL")) {
- addVisibleAnswers(_q);
- if (_numVisAnswers) {
- _answerId = _visAnswers[0]._index;
- transitionToState(NEXT_QUESTION);
- } else {
- transitionToState(DIALOGUE_OVER);
- }
+ // try and check if there are any suitable answers,
+ // given the current game state
+ addVisibleAnswers(_q);
+ if (!_numVisAnswers) {
+ transitionToState(DIALOGUE_OVER);
return;
}
-
- transitionToState(displayAnswers() ? RUN_ANSWER : DIALOGUE_OVER);
+
+ if (!_visAnswers[0]._a->_text.compareToIgnoreCase("NULL")) {
+ _answerId = _visAnswers[0]._index;
+ transitionToState(NEXT_QUESTION);
+ } else {
+ transitionToState(displayAnswers() ? RUN_ANSWER : DIALOGUE_OVER);
+ }
}
void DialogueManager::runAnswer() {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list