anchor.diff:  end;
   
   
  -function TKMTerrain.TileHasParameter(X,Y: Word; aCheckTileFunc: TBooleanWordFunc): Boolean;
  +function TKMTerrain.TileHasParameter(X,Y: Word; aCheckTileFunc: TBooleanWordFunc; aAllow2CornerTiles: Boolean = True): Boolean;
   var
     K, Cnt: Integer;
     Corners: TKMWordArray;
  
positive.code:         Inc(Cnt);
  
      //Consider tile has parameter if it has 3 corners with that parameter or if it has 2 corners and base layer has the parameter
      Result := (Cnt >= 3) or ((Cnt = 2) and aCheckTileFunc(Land[Y, X].BaseLayer.Terrain));
    end;
  end;
  
  
negative.code: 
      fBoundsWC: TKMRect; //WC rebuild bounds used in FlattenTerrain (put outside to fight with recursion SO error in FlattenTerrain EnsureWalkable)
  
      function TileHasParameter(X,Y: Word; aCheckTileFunc: TBooleanWordFunc; aAllow2CornerTiles: Boolean = True): Boolean;
  
      function GetMiningRect(aRes: TKMWareType): TKMRect;
  
  