Fix NDT_PLANTLIKE scaling to always keep the bottom at ground level
authorPerttu Ahola <celeron55@gmail.com>
Tue, 15 Nov 2011 19:13:22 +0000 (21:13 +0200)
committerPerttu Ahola <celeron55@gmail.com>
Tue, 29 Nov 2011 17:13:44 +0000 (19:13 +0200)
src/content_mapblock.cpp
src/content_mapnode.cpp

index 3950c83c3cfc0da20ef5c9a31c2d5a58db4361d6..fd2a30bafe14f6fc57fa668e1b4ea7e5368b04fe 100644 (file)
@@ -789,13 +789,15 @@ void mapblock_mesh_generate_special(MeshMakeData *data,
                        {
                                video::S3DVertex vertices[4] =
                                {
-                                       video::S3DVertex(-BS/2,-BS/2,0, 0,0,0, c,
+                                       video::S3DVertex(-BS/2*f.visual_scale,-BS/2,0, 0,0,0, c,
                                                pa_papyrus.x0(), pa_papyrus.y1()),
-                                       video::S3DVertex(BS/2,-BS/2,0, 0,0,0, c,
+                                       video::S3DVertex( BS/2*f.visual_scale,-BS/2,0, 0,0,0, c,
                                                pa_papyrus.x1(), pa_papyrus.y1()),
-                                       video::S3DVertex(BS/2,BS/2,0, 0,0,0, c,
+                                       video::S3DVertex( BS/2*f.visual_scale,
+                                               -BS/2 + f.visual_scale*BS,0, 0,0,0, c,
                                                pa_papyrus.x1(), pa_papyrus.y0()),
-                                       video::S3DVertex(-BS/2,BS/2,0, 0,0,0, c,
+                                       video::S3DVertex(-BS/2*f.visual_scale,
+                                               -BS/2 + f.visual_scale*BS,0, 0,0,0, c,
                                                pa_papyrus.x0(), pa_papyrus.y0()),
                                };
 
index 1ef3fe0d14f4990d7e629502ee452bb25633d50e..e2cf57010fb2637097100ff68275fe16e336fcb6 100644 (file)
@@ -266,7 +266,7 @@ void content_mapnode_init(IWritableNodeDefManager *nodemgr)
        i = CONTENT_JUNGLEGRASS;
        f = nodemgr->getModifiable(i);
        f->drawtype = NDT_PLANTLIKE;
-       f->visual_scale = 1.6;
+       f->visual_scale = 1.3;
        f->setAllTextures("junglegrass.png");
        f->setInventoryTexture("junglegrass.png");
        f->light_propagates = true;