Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Plantlike meshoptions: Fix inverted random vertical offset
  • Loading branch information
numberZero authored and paramat committed Jun 11, 2017
1 parent 842acbf commit 7bfd53b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/content_mapblock.cpp
Expand Up @@ -836,7 +836,7 @@ void MapblockMeshGenerator::drawPlantlikeQuad(float rotation, float quad_offset,
};
if (random_offset_Y) {
PseudoRandom yrng(face_num++ | p.X << 16 | p.Z << 8 | p.Y << 24);
offset.Y = BS * ((yrng.next() % 16 / 16.0) * 0.125);
offset.Y = -BS * ((yrng.next() % 16 / 16.0) * 0.125);
}
int offset_count = offset_top_only ? 2 : 4;
for (int i = 0; i < offset_count; i++)
Expand Down

0 comments on commit 7bfd53b

Please sign in to comment.