From: Holger Schemel Date: Sun, 16 Jul 2006 21:09:07 +0000 (+0200) Subject: rnd-20060716-2-src X-Git-Tag: 3.2.1^2~41 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=f5859ace642a543cafcd27f8fc7b96d8baf31436;p=rocksndiamonds.git rnd-20060716-2-src * fixed bug (very special case) with CE_SCORE_GETS_ZERO, which can affect multiple instances of the same CE, although this kind of change condition usually only affects one single custom element --- diff --git a/ChangeLog b/ChangeLog index b568e17a..4a0bb135 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2006-07-16 + * fixed bug (very special case) with CE_SCORE_GETS_ZERO, which can + affect multiple instances of the same CE, although this kind of + change condition usually only affects one single custom element + 2006-07-16 * version number set to 3.2.1 diff --git a/src/conftime.h b/src/conftime.h index 34832b94..200c0a43 100644 --- a/src/conftime.h +++ b/src/conftime.h @@ -1 +1 @@ -#define COMPILE_DATE_STRING "[2006-07-16 14:46]" +#define COMPILE_DATE_STRING "[2006-07-16 23:06]" diff --git a/src/game.c b/src/game.c index f06c86d8..20491136 100644 --- a/src/game.c +++ b/src/game.c @@ -8420,6 +8420,8 @@ static void ExecuteCustomElementAction(int x, int y, int element, int page) if (ei->collect_score == 0) { + int xx, yy; + #if 0 printf("::: CE_SCORE_GETS_ZERO\n"); #endif @@ -8430,6 +8432,26 @@ static void ExecuteCustomElementAction(int x, int y, int element, int page) #if 0 printf("::: RESULT: %d, %d\n", Feld[x][y], ChangePage[x][y]); #endif + +#if 1 + /* + This is a very special case that seems to be a mixture between + CheckElementChange() and CheckTriggeredElementChange(): while + the first one only affects single elements that are triggered + directly, the second one affects multiple elements in the playfield + that are triggered indirectly by another element. This is a third + case: Changing the CE score always affects multiple identical CEs, + so every affected CE must be checked, not only the single CE for + which the CE score was changed in the first place (as every instance + of that CE shares the same CE score, and therefore also can change)! + */ + SCAN_PLAYFIELD(xx, yy) + { + if (Feld[xx][yy] == element) + CheckElementChange(xx, yy, element, EL_UNDEFINED, + CE_SCORE_GETS_ZERO); + } +#endif } }