mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 00:25:19 +02:00
Time: Remove serverside getter, and use atomic operations
It isn't possible to use atomic operations for floats, so don't use them there. Having a lock is good out of other reasons too, because this way the float time and the integer time both match, and can't get different values in a race, e.g. when two setTimeofDay() get executed simultaneously.
This commit is contained in:
@@ -223,7 +223,6 @@ public:
|
||||
// Both setter and getter need no envlock,
|
||||
// can be called freely from threads
|
||||
void setTimeOfDay(u32 time);
|
||||
inline u32 getTimeOfDay();
|
||||
|
||||
/*
|
||||
Shall be called with the environment locked.
|
||||
|
Reference in New Issue
Block a user