From 39439cbd3dd4acce0ff897e3e277736251dde2a4 Mon Sep 17 00:00:00 2001 From: RealBadAngel Date: Wed, 8 Jul 2015 11:20:07 +0200 Subject: Add new leaves style - simple (glasslike drawtype) --- src/nodedef.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src/nodedef.cpp') diff --git a/src/nodedef.cpp b/src/nodedef.cpp index e392f477a..ccafd4598 100644 --- a/src/nodedef.cpp +++ b/src/nodedef.cpp @@ -780,7 +780,6 @@ void CNodeDefManager::updateTextures(IGameDef *gamedef, scene::IMeshManipulator* meshmanip = smgr->getMeshManipulator(); bool new_style_water = g_settings->getBool("new_style_water"); - bool new_style_leaves = g_settings->getBool("new_style_leaves"); bool connected_glass = g_settings->getBool("connected_glass"); bool opaque_water = g_settings->getBool("opaque_water"); bool enable_shaders = g_settings->getBool("enable_shaders"); @@ -788,6 +787,7 @@ void CNodeDefManager::updateTextures(IGameDef *gamedef, bool enable_parallax_occlusion = g_settings->getBool("enable_parallax_occlusion"); bool enable_mesh_cache = g_settings->getBool("enable_mesh_cache"); bool enable_minimap = g_settings->getBool("enable_minimap"); + std::string leaves_style = g_settings->get("leaves_style"); bool use_normal_texture = enable_shaders && (enable_bumpmapping || enable_parallax_occlusion); @@ -860,10 +860,18 @@ void CNodeDefManager::updateTextures(IGameDef *gamedef, f->visual_solidness = 1; break; case NDT_ALLFACES_OPTIONAL: - if (new_style_leaves) { + if (leaves_style == "fancy") { f->drawtype = NDT_ALLFACES; f->solidness = 0; f->visual_solidness = 1; + } else if (leaves_style == "simple") { + for (u32 j = 0; j < 6; j++) { + if (f->tiledef_special[j].name != "") + tiledef[j].name = f->tiledef_special[j].name; + } + f->drawtype = NDT_GLASSLIKE; + f->solidness = 0; + f->visual_solidness = 1; } else { f->drawtype = NDT_NORMAL; f->solidness = 2; -- cgit v1.2.3