summaryrefslogtreecommitdiffstats
path: root/src/render/Timecycle.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/render/Timecycle.cpp')
-rw-r--r--src/render/Timecycle.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/render/Timecycle.cpp b/src/render/Timecycle.cpp
index c120c003..bf55d7bc 100644
--- a/src/render/Timecycle.cpp
+++ b/src/render/Timecycle.cpp
@@ -175,7 +175,11 @@ CTimeCycle::Initialise(void)
bi++;
bi++;
}
- while(work_buff[bi] != '\n')
+ while(work_buff[bi] != '\n'
+#ifdef FIX_BUGS
+ && work_buff[bi] != '\0'
+#endif
+ )
line[li++] = work_buff[bi++];
line[li] = '\0';
bi++;
@@ -350,7 +354,7 @@ CTimeCycle::Update(void)
m_CurrentStoredValue = (m_CurrentStoredValue+1)&0xF;
float sunAngle = 2*PI*(CClock::GetSeconds()/60.0f + CClock::GetMinutes() + CClock::GetHours()*60)/(24*60);
- CVector &sunPos = GetSunPosition();
+ CVector &sunPos = GetSunDirection();
sunPos.x = Sin(sunAngle);
sunPos.y = 1.0f;
sunPos.z = 0.2f - Cos(sunAngle);