The cause for this bug was checking the "Stop[][]" field for deciding
if a "game of life" style element has changed and needs to be redrawn,
but with the current implementation (which is in fact not correct), it
may happen that the same element changes twice in the same game frame,
causing the corresponding graphics not be updated again (and therefore
showing the wrong state).
Directly comparing the new with the old state fixes this problem.
for (y1 = -1; y1 < 2; y1++) for (x1 = -1; x1 < 2; x1++)
{
int xx = ax+x1, yy = ay+y1;
+ int old_element = Feld[xx][yy];
int nachbarn = 0;
if (!IN_LEV_FIELD(xx, yy))
nachbarn > life_parameter[1])
{
Feld[xx][yy] = EL_EMPTY;
- if (!Stop[xx][yy])
+ if (Feld[xx][yy] != old_element)
TEST_DrawLevelField(xx, yy);
Stop[xx][yy] = TRUE;
changed = TRUE;
{
Feld[xx][yy] = element;
MovDelay[xx][yy] = (element == EL_GAME_OF_LIFE ? 0 : life_time-1);
- if (!Stop[xx][yy])
+ if (Feld[xx][yy] != old_element)
TEST_DrawLevelField(xx, yy);
Stop[xx][yy] = TRUE;
changed = TRUE;