aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorParamat <paramat@users.noreply.github.com>2018-04-09 02:23:47 +0100
committerGitHub <noreply@github.com>2018-04-09 02:23:47 +0100
commitaf868421da766d11d444c8ead30d5b422507800b (patch)
tree7c2abb293d7b32cfc83070d7974ebbae2012c056
parent746ca41f58e356b0fbeeca1b43b7061ad1e1c02d (diff)
downloadminetest-af868421da766d11d444c8ead30d5b422507800b.tar.gz
minetest-af868421da766d11d444c8ead30d5b422507800b.tar.bz2
minetest-af868421da766d11d444c8ead30d5b422507800b.zip
Sun colour: Undo colour change. Remove double assignment (#7227)
Commit 5070ca2111dd5b3f333a942059ef2c592de8dc24 changed sun colour by fixing what seemed to be a code mistake. Return to the standard colour but comment-out the first assignment of the double-assignment for performance. Add a comment to explain.
-rw-r--r--src/sky.cpp16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/sky.cpp b/src/sky.cpp
index e2f578cb6..6ac27afc4 100644
--- a/src/sky.cpp
+++ b/src/sky.cpp
@@ -137,13 +137,17 @@ void Sky::render()
if (m_sunlight_seen) {
float sunsize = 0.07;
video::SColorf suncolor_f(1, 1, 0, 1);
- suncolor_f.r = 1;
- suncolor_f.g = MYMAX(0.3, MYMIN(1.0, 0.7 + m_time_brightness * 0.5));
- suncolor_f.b = MYMAX(0.0, m_brightness * 0.95);
+ //suncolor_f.r = 1;
+ //suncolor_f.g = MYMAX(0.3, MYMIN(1.0, 0.7 + m_time_brightness * 0.5));
+ //suncolor_f.b = MYMAX(0.0, m_brightness * 0.95);
video::SColorf suncolor2_f(1, 1, 1, 1);
- suncolor2_f.r = 1;
- suncolor2_f.g = MYMAX(0.3, MYMIN(1.0, 0.85 + m_time_brightness * 0.5));
- suncolor2_f.b = MYMAX(0.0, m_brightness);
+ // The values below were probably meant to be suncolor2_f instead of a
+ // reassignment of suncolor_f. However, the resulting colour was chosen
+ // and is our long-running classic colour. So preserve, but comment-out
+ // the unnecessary first assignments above.
+ suncolor_f.r = 1;
+ suncolor_f.g = MYMAX(0.3, MYMIN(1.0, 0.85 + m_time_brightness * 0.5));
+ suncolor_f.b = MYMAX(0.0, m_brightness);
float moonsize = 0.04;
video::SColorf mooncolor_f(0.50, 0.57, 0.65, 1);