diff options
author | est31 <MTest31@outlook.com> | 2016-04-02 01:43:34 +0200 |
---|---|---|
committer | est31 <MTest31@outlook.com> | 2016-04-02 02:02:19 +0200 |
commit | b8ac7b80e6031f1322b76d638256f8e4a52e89d1 (patch) | |
tree | 69c533728e50757b92c5b4f407ec19a41dfdcf0e | |
parent | c8ff11b417ae2c3a156bcaca819eaeec334c76b5 (diff) | |
download | minetest-b8ac7b80e6031f1322b76d638256f8e4a52e89d1.tar.gz minetest-b8ac7b80e6031f1322b76d638256f8e4a52e89d1.tar.bz2 minetest-b8ac7b80e6031f1322b76d638256f8e4a52e89d1.zip |
Fix nametag hiding
Commit
c3b279750ece0b5144bf8e973d55108347462223 "Move object nametags to camera"
has added a regression to still display
a shadow if their alpha got set to 0.
-rw-r--r-- | src/camera.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/camera.cpp b/src/camera.cpp index 6c0f5d546..6893b8cbf 100644 --- a/src/camera.cpp +++ b/src/camera.cpp @@ -540,6 +540,12 @@ void Camera::drawNametags() i = m_nametags.begin(); i != m_nametags.end(); ++i) { Nametag *nametag = *i; + if (nametag->nametag_color.getAlpha() == 0) { + // Enforce hiding nametag, + // because if freetype is enabled, a grey + // shadow can remain. + continue; + } v3f pos = nametag->parent_node->getPosition() + v3f(0.0, 1.1 * BS, 0.0); f32 transformed_pos[4] = { pos.X, pos.Y, pos.Z, 1.0f }; trans.multiplyWith1x4Matrix(transformed_pos); |