MORTEVIELLE: Use similar check in fctClose and fctSearch than in fctSelfPut

This commit is contained in:
Strangerke 2013-08-22 00:42:17 +02:00
parent 2b03c63631
commit 558f404e62

View File

@ -523,9 +523,12 @@ void MortevielleEngine::fctSearch() {
setCoordinates(7); setCoordinates(7);
if (_num != 0) { if (_num != 0) {
int i; int i;
for (i = 1; (i <= 6) && (_num != _openObjects[i]); i++) for (i = 1; i <= 6; i++) {
; if (_num == _openObjects[i])
if (_num == _openObjects[i]) { break;
}
if (i <= 6) {
if (_currBitIndex > 0) if (_currBitIndex > 0)
_coreVar._faithScore += 3; _coreVar._faithScore += 3;
@ -913,9 +916,12 @@ void MortevielleEngine::fctClose() {
setCoordinates(7); setCoordinates(7);
if (_num != 0) { if (_num != 0) {
int i; int i;
for (i = 1; (i <= 6) && (_num != _openObjects[i]); ++i) for (i = 1; i <= 6; ++i) {
; if (_num == _openObjects[i])
if (_num == _openObjects[i]) { break;
}
if (i <= 6) {
displayAnimFrame(2, _num); displayAnimFrame(2, _num);
_crep = 998; _crep = 998;
_openObjects[i] = 0; _openObjects[i] = 0;