diff options
author | Strangerke | 2013-08-22 00:42:17 +0200 |
---|---|---|
committer | Strangerke | 2013-08-22 00:42:17 +0200 |
commit | 558f404e62ca0139623ed7eefd7edc96ab1d1f7f (patch) | |
tree | 431581579347a79166dafa8bfe6120a7a74a7090 | |
parent | 2b03c63631014e547e2eb65a0db0342937249de3 (diff) | |
download | scummvm-rg350-558f404e62ca0139623ed7eefd7edc96ab1d1f7f.tar.gz scummvm-rg350-558f404e62ca0139623ed7eefd7edc96ab1d1f7f.tar.bz2 scummvm-rg350-558f404e62ca0139623ed7eefd7edc96ab1d1f7f.zip |
MORTEVIELLE: Use similar check in fctClose and fctSearch than in fctSelfPut
-rw-r--r-- | engines/mortevielle/actions.cpp | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/engines/mortevielle/actions.cpp b/engines/mortevielle/actions.cpp index c0d4963565..b68dd48b0f 100644 --- a/engines/mortevielle/actions.cpp +++ b/engines/mortevielle/actions.cpp @@ -523,9 +523,12 @@ void MortevielleEngine::fctSearch() { setCoordinates(7); if (_num != 0) { int i; - for (i = 1; (i <= 6) && (_num != _openObjects[i]); i++) - ; - if (_num == _openObjects[i]) { + for (i = 1; i <= 6; i++) { + if (_num == _openObjects[i]) + break; + } + + if (i <= 6) { if (_currBitIndex > 0) _coreVar._faithScore += 3; @@ -913,9 +916,12 @@ void MortevielleEngine::fctClose() { setCoordinates(7); if (_num != 0) { int i; - for (i = 1; (i <= 6) && (_num != _openObjects[i]); ++i) - ; - if (_num == _openObjects[i]) { + for (i = 1; i <= 6; ++i) { + if (_num == _openObjects[i]) + break; + } + + if (i <= 6) { displayAnimFrame(2, _num); _crep = 998; _openObjects[i] = 0; |