summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornumber Zero <silverunicorn2011@yandex.ru>2017-06-09 20:31:16 +0300
committerparamat <mat.gregory@virginmedia.com>2017-06-11 02:12:33 +0100
commit7bfd53ba587a1be71c1f8b3ebc3208d59f4da9c1 (patch)
treeea567bf31568d4cd9472eb8dc9283cb1b1204f24
parent842acbfad2b70550c562f6429d02c980912d2273 (diff)
downloadminetest-7bfd53ba587a1be71c1f8b3ebc3208d59f4da9c1.tar.gz
minetest-7bfd53ba587a1be71c1f8b3ebc3208d59f4da9c1.tar.bz2
minetest-7bfd53ba587a1be71c1f8b3ebc3208d59f4da9c1.zip
Plantlike meshoptions: Fix inverted random vertical offset
-rw-r--r--src/content_mapblock.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/content_mapblock.cpp b/src/content_mapblock.cpp
index 326433141..d7ee8fb82 100644
--- a/src/content_mapblock.cpp
+++ b/src/content_mapblock.cpp
@@ -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++)