summaryrefslogtreecommitdiff
path: root/src/sky.h
diff options
context:
space:
mode:
authorCraig Robbins <kde.psych@gmail.com>2014-10-07 17:01:07 +1000
committerKahrl <kahrl@gmx.net>2014-10-19 15:33:08 +0200
commit076c5ee2234c7f217f8941bbbd710d317485ccbc (patch)
treed59d05cf111a7fb79960878a9d51864ea6ff5b97 /src/sky.h
parentfe8ef1be59399a327d9df50a0ab823bb2731de79 (diff)
downloadminetest-076c5ee2234c7f217f8941bbbd710d317485ccbc.tar.gz
minetest-076c5ee2234c7f217f8941bbbd710d317485ccbc.tar.bz2
minetest-076c5ee2234c7f217f8941bbbd710d317485ccbc.zip
Various uninitialised variable fixes
sky.cpp: m_bgcolor.getAlpha() was being used before initialised mesh related: m_highlight_mesh_color was being used uninitialised
Diffstat (limited to 'src/sky.h')
-rw-r--r--src/sky.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/sky.h b/src/sky.h
index d7dabedb8..4af6be024 100644
--- a/src/sky.h
+++ b/src/sky.h
@@ -79,7 +79,8 @@ private:
{
if (!m_sunlight_seen)
return 0;
- float x; m_time_of_day >= 0.5 ? x = (1 - m_time_of_day) * 2 : x = m_time_of_day * 2;
+ float x = m_time_of_day >= 0.5 ? (1 - m_time_of_day) * 2 : m_time_of_day * 2;
+
if (x <= 0.3)
return 0;
if (x <= 0.4) // when the sun and moon are aligned