diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/defaultsettings.cpp | 2 | ||||
-rw-r--r-- | src/nodedef.cpp | 12 |
2 files changed, 11 insertions, 3 deletions
diff --git a/src/defaultsettings.cpp b/src/defaultsettings.cpp index 9015c28a4..da5dcae94 100644 --- a/src/defaultsettings.cpp +++ b/src/defaultsettings.cpp @@ -107,7 +107,7 @@ void set_default_settings(Settings *settings) settings->setDefault("fov", "72"); settings->setDefault("view_bobbing", "true"); settings->setDefault("new_style_water", "false"); - settings->setDefault("new_style_leaves", "true"); + settings->setDefault("leaves_style", "fancy"); settings->setDefault("connected_glass", "false"); settings->setDefault("smooth_lighting", "true"); settings->setDefault("display_gamma", "1.8"); 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; |