Fix NDT_PLANTLIKE scaling to always keep the bottom at ground level

This commit is contained in:
Perttu Ahola 2011-11-15 21:13:22 +02:00
parent e5fd010a6c
commit c3703ded95
2 changed files with 7 additions and 5 deletions

View File

@ -789,13 +789,15 @@ void mapblock_mesh_generate_special(MeshMakeData *data,
{ {
video::S3DVertex vertices[4] = 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()), 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()), 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()), 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()), pa_papyrus.x0(), pa_papyrus.y0()),
}; };

View File

@ -266,7 +266,7 @@ void content_mapnode_init(IWritableNodeDefManager *nodemgr)
i = CONTENT_JUNGLEGRASS; i = CONTENT_JUNGLEGRASS;
f = nodemgr->getModifiable(i); f = nodemgr->getModifiable(i);
f->drawtype = NDT_PLANTLIKE; f->drawtype = NDT_PLANTLIKE;
f->visual_scale = 1.6; f->visual_scale = 1.3;
f->setAllTextures("junglegrass.png"); f->setAllTextures("junglegrass.png");
f->setInventoryTexture("junglegrass.png"); f->setInventoryTexture("junglegrass.png");
f->light_propagates = true; f->light_propagates = true;