]> git.lizzy.rs Git - minetest.git/commitdiff
Plantlike: Fix visual_scale being applied squared (#5115)
authorParamat <paramat@users.noreply.github.com>
Sat, 28 Jan 2017 10:07:35 +0000 (10:07 +0000)
committerZeno- <kde.psych@gmail.com>
Sat, 28 Jan 2017 10:07:35 +0000 (20:07 +1000)
Visual_scale was applied twice to plantlike by accident sometime between
2011 and 2013, squaring the requested scale value. Visual_scale is
correctly applied once in it's other uses in signlike and torchlike.

Two lines of code are removed, they also had no effect for the vast
majority of nodes with the default visual_scale of 1.0.
The texture continues to have it's base at ground level.

src/content_mapblock.cpp

index 45822666f22e7bc70bdd08d8293bbd00d04ad242..9923647bcde87a26f42542ee93172b3a0c6d46f1 100644 (file)
@@ -1602,8 +1602,6 @@ void mapblock_mesh_generate_special(MeshMakeData *data,
                                }
 
                                for (int i = 0; i < 4; i++) {
-                                       vertices[i].Pos *= f.visual_scale;
-                                       vertices[i].Pos.Y += BS/2 * (f.visual_scale - 1);
                                        if (data->m_smooth_lighting)
                                                vertices[i].Color = blendLight(frame, vertices[i].Pos, tile.color);
                                        vertices[i].Pos += intToFloat(p, BS);