Skip to content

Commit

Permalink
Decorations: Remove error message 'chunksize not divisable by sidelen'
Browse files Browse the repository at this point in the history
Sidelen larger than 16 is essential for low density decorations
With sidelen > 16 chunksize may not be divisable by sidelen if
chunksize is changed, in this situation setting sidelen = chunksize
is desirable and should not create error messages.
  • Loading branch information
paramat committed Sep 26, 2015
1 parent e728281 commit ffe291c
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/mg_decoration.cpp
Expand Up @@ -90,11 +90,9 @@ size_t Decoration::placeDeco(Mapgen *mg, u32 blockseed, v3s16 nmin, v3s16 nmax)
int carea_size = nmax.X - nmin.X + 1;

// Divide area into parts
if (carea_size % sidelen) {
errorstream << "Decoration::placeDeco: chunk size is not divisible by "
"sidelen; setting sidelen to " << carea_size << std::endl;
// If chunksize is changed it may no longer be divisable by sidelen
if (carea_size % sidelen)
sidelen = carea_size;
}

s16 divlen = carea_size / sidelen;
int area = sidelen * sidelen;
Expand Down

0 comments on commit ffe291c

Please sign in to comment.