Fix freezer drawing land outside of indestructible land border in some map types
authorWuzzy <Wuzzy2@mail.ru>
Sat, 15 Jun 2019 01:18:40 +0200
changeset 15140 53342ce3f0a6
parent 15139 adf6f9be8113
child 15141 af14c418c92f
Fix freezer drawing land outside of indestructible land border in some map types
hedgewars/uLandGraphics.pas
--- a/hedgewars/uLandGraphics.pas	Fri Jun 14 22:24:59 2019 +0200
+++ b/hedgewars/uLandGraphics.pas	Sat Jun 15 01:18:40 2019 +0200
@@ -161,6 +161,7 @@
 procedure DrawPixelIce(landX, landY, pixelX, pixelY: Longint); inline;
 begin
 if ((Land[landY, landX] and lfIce) <> 0) then exit;
+if (pixelX < LeftX) or (pixelX > RightX) or (pixelY < TopY) then exit;
 if isLandscapeEdge(getPixelWeight(landX, landY)) then
     begin
     if (LandPixels[pixelY, pixelX] and AMask < 255) and (LandPixels[pixelY, pixelX] and AMask > 0) then