aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPerttu Ahola <celeron55@gmail.com>2011-11-15 21:13:22 +0200
committerPerttu Ahola <celeron55@gmail.com>2011-11-29 19:13:44 +0200
commitc3703ded953326823c5a0941881d23f3f136f88d (patch)
treec3f0f157f233237717e1cb8b86969ce806e73553 /src
parente5fd010a6cbe43ceffc2ffee02d274c564b97a3a (diff)
downloadminetest-c3703ded953326823c5a0941881d23f3f136f88d.tar.gz
minetest-c3703ded953326823c5a0941881d23f3f136f88d.tar.bz2
minetest-c3703ded953326823c5a0941881d23f3f136f88d.zip
Fix NDT_PLANTLIKE scaling to always keep the bottom at ground level
Diffstat (limited to 'src')
-rw-r--r--src/content_mapblock.cpp10
-rw-r--r--src/content_mapnode.cpp2
2 files changed, 7 insertions, 5 deletions
diff --git a/src/content_mapblock.cpp b/src/content_mapblock.cpp
index 3950c83c3..fd2a30baf 100644
--- a/src/content_mapblock.cpp
+++ b/src/content_mapblock.cpp
@@ -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()),
};
diff --git a/src/content_mapnode.cpp b/src/content_mapnode.cpp
index 1ef3fe0d1..e2cf57010 100644
--- a/src/content_mapnode.cpp
+++ b/src/content_mapnode.cpp
@@ -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;