mirror of https://github.com/minetest/minetest.git
Changes to be committed:
modified: builtin/settingtypes.txt modified: src/nodedef.cpp modified: src/nodedef.h
This commit is contained in:
parent
93f4844c9c
commit
5c8e2bd321
|
@ -265,8 +265,8 @@ undersampling (Undersampling) int 1 1 8
|
|||
|
||||
[**Graphics Effects]
|
||||
|
||||
# Makes all liquids opaque
|
||||
opaque_water (Opaque liquids) bool false
|
||||
# Makes water translucent
|
||||
translucent_water (Translucent water) bool true
|
||||
|
||||
# Leaves style:
|
||||
# - Fancy: all faces visible
|
||||
|
|
|
@ -283,7 +283,20 @@ void TileDef::deSerialize(std::istream &is, NodeDrawType drawtype, u16 protocol_
|
|||
void TextureSettings::readSettings()
|
||||
{
|
||||
connected_glass = g_settings->getBool("connected_glass");
|
||||
opaque_water = g_settings->getBool("opaque_water");
|
||||
|
||||
//Update from opaque_water to translucent_water
|
||||
if (g_settings->exists("opaque_water")) {
|
||||
std::string value = "true";
|
||||
if (g_settings->getBool("opaque_water")) {
|
||||
value = "false";
|
||||
}
|
||||
g_settings->getLayer(SL_DEFAULTS)->set("translucent_water", value);
|
||||
translucent_water = g_settings->getBool("translucent_water");
|
||||
}
|
||||
else {
|
||||
translucent_water = g_settings->getBool("translucent_water");
|
||||
}
|
||||
|
||||
bool smooth_lighting = g_settings->getBool("smooth_lighting");
|
||||
enable_mesh_cache = g_settings->getBool("enable_mesh_cache");
|
||||
enable_minimap = g_settings->getBool("enable_minimap");
|
||||
|
@ -683,7 +696,7 @@ void ContentFeatures::deSerialize(std::istream &is, u16 protocol_version)
|
|||
if (is.eof())
|
||||
throw SerializationError("");
|
||||
post_effect_color_shaded = tmp;
|
||||
} catch(SerializationError &e) {};
|
||||
} catch (SerializationError &e) {};
|
||||
}
|
||||
|
||||
#ifndef SERVER
|
||||
|
@ -825,14 +838,14 @@ void ContentFeatures::updateTextures(ITextureSource *tsrc, IShaderSource *shdsrc
|
|||
solidness = 0;
|
||||
break;
|
||||
case NDT_LIQUID:
|
||||
if (tsettings.opaque_water)
|
||||
if (!tsettings.translucent_water)
|
||||
alpha = ALPHAMODE_OPAQUE;
|
||||
solidness = 1;
|
||||
is_liquid = true;
|
||||
break;
|
||||
case NDT_FLOWINGLIQUID:
|
||||
solidness = 0;
|
||||
if (tsettings.opaque_water)
|
||||
if (!tsettings.translucent_water)
|
||||
alpha = ALPHAMODE_OPAQUE;
|
||||
is_liquid = true;
|
||||
break;
|
||||
|
|
|
@ -184,7 +184,7 @@ public:
|
|||
WorldAlignMode world_aligned_mode;
|
||||
AutoScale autoscale_mode;
|
||||
int node_texture_size;
|
||||
bool opaque_water;
|
||||
bool translucent_water;
|
||||
bool connected_glass;
|
||||
bool enable_mesh_cache;
|
||||
bool enable_minimap;
|
||||
|
|
Loading…
Reference in New Issue