Bugfix in makeCuboid - apply rotations to all faces when 1 tile is given.
authorRealBadAngel <maciej.kasatkin@o2.pl>
Sun, 20 Jul 2014 14:22:48 +0000 (16:22 +0200)
committerRealBadAngel <maciej.kasatkin@o2.pl>
Sun, 20 Jul 2014 14:22:48 +0000 (16:22 +0200)
src/content_mapblock.cpp

index 32e80c2998bbca6b5ef57f7d8f9278f46ff48f1c..a00d9f3073dafbeb762d43b09f32bed65845edbb 100644 (file)
@@ -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;