1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-11 17:51:04 +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

@ -1249,6 +1249,11 @@ void Server::setTimeOfDay(u32 time)
m_time_of_day_send_timer = 0;
}
u32 Server::getTimeOfDay()
{
return m_env->getTimeOfDay();
}
void Server::onMapEditEvent(MapEditEvent *event)
{
if(m_ignore_map_edit_events)