1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Environment: Time of day fixes and add serverside getter

-> Put access to time variables under the time lock.
-> Merge both time locks, there is no point to have two locks.
-> Fix the lock being released too early in Environment::setTimeOfDay
-> Add serverside getter so that you don't have to get
	the environment if you only have the server
This commit is contained in:
est31 2015-10-27 21:03:59 +01:00
parent c406438b95
commit ca8e56c15a
4 changed files with 31 additions and 17 deletions

View file

@ -220,8 +220,10 @@ public:
void Send(NetworkPacket* pkt);
// Environment must be locked when called
// 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.