From 83a9cd065c9f1aceeeacdce729b6e72eb12e2dfb Mon Sep 17 00:00:00 2001 From: Sergey Semushin Date: Sat, 22 Jun 2019 12:04:02 +0300 Subject: [PATCH] Fix min diff in DL2_FillVoids. --- Source/drlg_l2.cpp | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/Source/drlg_l2.cpp b/Source/drlg_l2.cpp index 97a5ea7ee..292114e1c 100644 --- a/Source/drlg_l2.cpp +++ b/Source/drlg_l2.cpp @@ -1652,45 +1652,34 @@ BOOL DL2_FillVoids() if(predungeon[xx][yy] != 35) { continue; } - yf2 = FALSE; - yf1 = FALSE; - xf2 = FALSE; - xf1 = FALSE; + xf1 = xf2 = yf1 = yf2 = FALSE; if(predungeon[xx - 1][yy] == 32 && predungeon[xx + 1][yy] == 46) { if(predungeon[xx + 1][yy - 1] == 46 && predungeon[xx + 1][yy + 1] == 46 && predungeon[xx - 1][yy - 1] == 32 && predungeon[xx - 1][yy + 1] == 32) { - yf2 = TRUE; - yf1 = TRUE; - xf1 = TRUE; + xf1 = yf1 = yf2 = TRUE; } } else if(predungeon[xx + 1][yy] == 32 && predungeon[xx - 1][yy] == 46) { if(predungeon[xx - 1][yy - 1] == 46 && predungeon[xx - 1][yy + 1] == 46 && predungeon[xx + 1][yy - 1] == 32 && predungeon[xx + 1][yy + 1] == 32) { - yf2 = TRUE; - yf1 = TRUE; - xf2 = TRUE; + xf2 = yf1 = yf2 = TRUE; } } else if(predungeon[xx][yy - 1] == 32 && predungeon[xx][yy + 1] == 46) { if(predungeon[xx - 1][yy + 1] == 46 && predungeon[xx + 1][yy + 1] == 46 && predungeon[xx - 1][yy - 1] == 32 && predungeon[xx + 1][yy - 1] == 32) { - xf2 = TRUE; - xf1 = TRUE; - yf1 = TRUE; + yf1 = xf1 = xf2 = TRUE; } } else if(predungeon[xx][yy + 1] == 32 && predungeon[xx][yy - 1] == 46) { if(predungeon[xx - 1][yy - 1] == 46 && predungeon[xx + 1][yy - 1] == 46 && predungeon[xx - 1][yy + 1] == 32 && predungeon[xx + 1][yy + 1] == 32) { - xf2 = TRUE; - xf1 = TRUE; - yf2 = TRUE; + yf2 = xf1 = xf2 = TRUE; } } if(DL2_Cont(xf1, yf1, xf2, yf2)) {