mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-27 13:42:02 +00:00
ZVISION: Add StateFlag handling to Puzzle checking
This commit is contained in:
parent
387bfb2806
commit
931ad00a2d
@ -77,6 +77,15 @@ void ScriptManager::checkPuzzleCriteria() {
|
||||
while (!_puzzlesToCheck.empty()) {
|
||||
Puzzle *puzzle = _puzzlesToCheck.pop();
|
||||
|
||||
// Check if the puzzle is already finished
|
||||
// If it doesn't have the flag ONCE_PER_INST it can be done more than once
|
||||
// Also check that the puzzle isn't disabled
|
||||
if (getStateValue(puzzle->key) == 1 &&
|
||||
(puzzle->flags & Puzzle::StateFlags::ONCE_PER_INST) == Puzzle::StateFlags::ONCE_PER_INST &&
|
||||
(puzzle->flags & Puzzle::StateFlags::DISABLED) == 0) {
|
||||
continue;
|
||||
}
|
||||
|
||||
debug("Checking puzzle: %u", puzzle->key);
|
||||
|
||||
// Check each Criteria
|
||||
|
Loading…
x
Reference in New Issue
Block a user