ZVISION: Set a Puzzle as completed before executing its ResultActions

This commit is contained in:
RichieSams 2013-09-07 18:06:20 -05:00
parent 81184d342c
commit eeace477a0

View File

@ -174,7 +174,8 @@ void ScriptManager::checkPuzzleCriteria() {
if (puzzle->criteriaList.empty() || criteriaMet) {
debug("Puzzle %u criteria passed. Executing its ResultActions", puzzle->key);
uint32 key = puzzle->key;
// Set the puzzle as completed
setStateValue(puzzle->key, 1);
bool shouldContinue = true;
for (Common::List<ResultAction *>::iterator resultIter = puzzle->resultActions.begin(); resultIter != puzzle->resultActions.end(); resultIter++) {
@ -184,9 +185,6 @@ void ScriptManager::checkPuzzleCriteria() {
}
}
// Set the puzzle as completed
setStateValue(key, 1);
if (!shouldContinue) {
break;
}