1
0
mirror of https://github.com/luanti-org/luanti.git synced 2025-10-13 08:35:20 +02:00

Various uninitialised variable fixes

sky.cpp: m_bgcolor.getAlpha() was being used before initialised

mesh related: m_highlight_mesh_color was being used uninitialised
This commit is contained in:
Craig Robbins
2014-10-07 17:01:07 +10:00
committed by Kahrl
parent fe8ef1be59
commit 076c5ee223
5 changed files with 27 additions and 27 deletions

View File

@@ -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