summaryrefslogtreecommitdiff
path: root/src/environment.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/environment.h')
-rw-r--r--src/environment.h18
1 files changed, 5 insertions, 13 deletions
diff --git a/src/environment.h b/src/environment.h
index 9eb440c42..761e9068b 100644
--- a/src/environment.h
+++ b/src/environment.h
@@ -81,22 +81,13 @@ public:
u32 getDayNightRatio();
// 0-23999
- virtual void setTimeOfDay(u32 time)
- {
- m_time_of_day = time;
- m_time_of_day_f = (float)time / 24000.0;
- }
-
- u32 getTimeOfDay()
- { return m_time_of_day; }
-
- float getTimeOfDayF()
- { return m_time_of_day_f; }
+ virtual void setTimeOfDay(u32 time);
+ u32 getTimeOfDay();
+ float getTimeOfDayF();
void stepTimeOfDay(float dtime);
void setTimeOfDaySpeed(float speed);
-
float getTimeOfDaySpeed();
void setDayNightRatioOverride(bool enable, u32 value)
@@ -134,7 +125,8 @@ protected:
bool m_cache_enable_shaders;
private:
- JMutex m_lock;
+ JMutex m_timeofday_lock;
+ JMutex m_time_lock;
};