aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRealBadAngel <maciej.kasatkin@o2.pl>2014-07-20 16:22:48 +0200
committerRealBadAngel <maciej.kasatkin@o2.pl>2014-07-20 16:22:48 +0200
commit70074800a207974a0c1383275186cefe6955f297 (patch)
treebc083352323c527642775eb93d79ced1c32975d1 /src
parent33ca115ae46e6a50290e652d280f1d6afb5e2cf8 (diff)
downloadminetest-70074800a207974a0c1383275186cefe6955f297.tar.gz
minetest-70074800a207974a0c1383275186cefe6955f297.tar.bz2
minetest-70074800a207974a0c1383275186cefe6955f297.zip
Bugfix in makeCuboid - apply rotations to all faces when 1 tile is given.
Diffstat (limited to 'src')
-rw-r--r--src/content_mapblock.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/content_mapblock.cpp b/src/content_mapblock.cpp
index 32e80c299..a00d9f307 100644
--- a/src/content_mapblock.cpp
+++ b/src/content_mapblock.cpp
@@ -99,9 +99,9 @@ void makeCuboid(MeshCollector *collector, const aabb3f &box,
video::S3DVertex(min.X,min.Y,min.Z, 0,0,-1, c, txc[20],txc[23]),
};
- for(int i = 0; i < tilecount; i++)
+ for(int i = 0; i < 6; i++)
{
- switch (tiles[i].rotation)
+ switch (tiles[MYMIN(i, tilecount-1)].rotation)
{
case 0:
break;