aboutsummaryrefslogtreecommitdiff
path: root/src/nodedef.cpp
diff options
context:
space:
mode:
authorsfan5 <sfan5@live.de>2021-01-16 22:16:04 +0100
committersfan5 <sfan5@live.de>2021-01-29 17:34:41 +0100
commitedd8c3c664ad005eb32e1968ce80091851ffb817 (patch)
treeaf80ed33fa80879ac97c6875fdbb930b857617ad /src/nodedef.cpp
parente6e5910cb432f0fb25a8af3dc6cb9950fd9a05f5 (diff)
downloadminetest-edd8c3c664ad005eb32e1968ce80091851ffb817.tar.xz
Drop never documented 'alpha' property from nodedef
Includes minimal support code for practical reasons. We'll need it for a slightly different purpose next commit.
Diffstat (limited to 'src/nodedef.cpp')
-rw-r--r--src/nodedef.cpp20
1 files changed, 0 insertions, 20 deletions
diff --git a/src/nodedef.cpp b/src/nodedef.cpp
index 1740b010a..b2cfd1f87 100644
--- a/src/nodedef.cpp
+++ b/src/nodedef.cpp
@@ -491,21 +491,6 @@ void ContentFeatures::serialize(std::ostream &os, u16 protocol_version) const
writeU8(os, leveled_max);
}
-void ContentFeatures::correctAlpha(TileDef *tiles, int length)
-{
- // alpha == 0 means that the node is using texture alpha
- if (alpha == 0 || alpha == 255)
- return;
-
- for (int i = 0; i < length; i++) {
- if (tiles[i].name.empty())
- continue;
- std::stringstream s;
- s << tiles[i].name << "^[noalpha^[opacity:" << ((int)alpha);
- tiles[i].name = s.str();
- }
-}
-
void ContentFeatures::deSerialize(std::istream &is)
{
// version detection
@@ -874,11 +859,6 @@ void ContentFeatures::updateTextures(ITextureSource *tsrc, IShaderSource *shdsrc
}
if (is_liquid) {
- // Vertex alpha is no longer supported, correct if necessary.
- correctAlpha(tdef, 6);
- correctAlpha(tdef_overlay, 6);
- correctAlpha(tdef_spec, CF_SPECIAL_COUNT);
-
if (waving == 3) {
material_type = (alpha == 255) ? TILE_MATERIAL_WAVING_LIQUID_OPAQUE :
TILE_MATERIAL_WAVING_LIQUID_TRANSPARENT;