Index: src/viewport.cpp =================================================================== --- src/viewport.cpp (wersja 27117) +++ src/viewport.cpp (kopia robocza) @@ -1509,7 +1509,8 @@ /* For some strange reason, those fields inside tile_info are uints. However, * in the old code their copies in an int variable where compared against zero. */ - if (0 < x && x < (int)MapMaxX() && 0 < y && y < (int)MapMaxY()) { + if (IsInsideMM(x, _settings_game.construction.freeform_edges ? 1 : 0, MapMaxX()) && + IsInsideMM(y, _settings_game.construction.freeform_edges ? 1 : 0, MapMaxY())) { /* We are inside the map => paint landscape. */ tile_info.tile = TileXY(tile_info.x, tile_info.y); tile_info.tileh = GetTilePixelSlope(tile_info.tile, &tile_info.z);