diff options
author | RichieSams | 2013-09-07 18:06:20 -0500 |
---|---|---|
committer | RichieSams | 2013-09-07 18:06:20 -0500 |
commit | eeace477a08d68ead85d39b90084b4e633a6127a (patch) | |
tree | f8dc82304d118fb9b00e7571a53bceb54bd35d27 | |
parent | 81184d342c6c03932d4c9c4620302283a09273be (diff) | |
download | scummvm-rg350-eeace477a08d68ead85d39b90084b4e633a6127a.tar.gz scummvm-rg350-eeace477a08d68ead85d39b90084b4e633a6127a.tar.bz2 scummvm-rg350-eeace477a08d68ead85d39b90084b4e633a6127a.zip |
ZVISION: Set a Puzzle as completed before executing its ResultActions
-rw-r--r-- | engines/zvision/script_manager.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/engines/zvision/script_manager.cpp b/engines/zvision/script_manager.cpp index f499adaa44..4952ebdda4 100644 --- a/engines/zvision/script_manager.cpp +++ b/engines/zvision/script_manager.cpp @@ -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; } |