mirror of
https://github.com/minetest/minetest.git
synced 2025-07-04 17:00:23 +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:
@ -1232,11 +1232,6 @@ 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)
|
||||
|
Reference in New Issue
Block a user