ZVISION: Set a Puzzle as completed before executing its ResultActions
This commit is contained in:
parent
81184d342c
commit
eeace477a0
1 changed files with 2 additions and 4 deletions
|
@ -174,7 +174,8 @@ void ScriptManager::checkPuzzleCriteria() {
|
||||||
if (puzzle->criteriaList.empty() || criteriaMet) {
|
if (puzzle->criteriaList.empty() || criteriaMet) {
|
||||||
debug("Puzzle %u criteria passed. Executing its ResultActions", puzzle->key);
|
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;
|
bool shouldContinue = true;
|
||||||
for (Common::List<ResultAction *>::iterator resultIter = puzzle->resultActions.begin(); resultIter != puzzle->resultActions.end(); resultIter++) {
|
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) {
|
if (!shouldContinue) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue