diff options
author | Craig Robbins <kde.psych@gmail.com> | 2014-10-07 17:01:07 +1000 |
---|---|---|
committer | Kahrl <kahrl@gmx.net> | 2014-10-19 15:33:08 +0200 |
commit | 076c5ee2234c7f217f8941bbbd710d317485ccbc (patch) | |
tree | d59d05cf111a7fb79960878a9d51864ea6ff5b97 /src/sky.h | |
parent | fe8ef1be59399a327d9df50a0ab823bb2731de79 (diff) | |
download | hax-minetest-server-076c5ee2234c7f217f8941bbbd710d317485ccbc.tar.gz hax-minetest-server-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 '')
-rw-r--r-- | src/sky.h | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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 |