mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-30 05:34:00 +00:00
ZVISION: Set a Puzzle as completed before executing its ResultActions
This commit is contained in:
parent
81184d342c
commit
eeace477a0
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user