summaryrefslogtreecommitdiff
path: root/src/sky.h
diff options
context:
space:
mode:
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