Fix display bug on disease propagation

This commit is contained in:
Shadow15510 2021-07-17 15:46:52 +02:00
parent b4bcd6b8ac
commit 9db6780618
1 changed files with 2 additions and 2 deletions

View File

@ -51,9 +51,9 @@ void display_foreground(const int background, const struct game *current_game, c
{
for (int j = 0; j < current_game->grid.height; j ++)
{
if (current_game->grid.data[i + j * current_game->grid.width] == 1) dpixel(i, j, C_RED);
if (current_game->grid.data[i + j * current_game->grid.width] == 1 && world[j][i] != 0) dpixel(i, j, C_RED);
if (current_game->grid.data[i + j * current_game->grid.width] == 3 && world[j][i] != 0) dpixel(i, j, C_BLACK);
if (current_game->grid.data[i + j * current_game->grid.width] == 2) dpixel(i, j, C_GREEN);
if (current_game->grid.data[i + j * current_game->grid.width] == 2 && world[j][i] != 0) dpixel(i, j, C_GREEN);
}
}