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:
parent
c406438b95
commit
ca8e56c15a
4 changed files with 31 additions and 17 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue