aboutsummaryrefslogtreecommitdiff
path: root/src/server.cpp
diff options
context:
space:
mode:
authorest31 <MTest31@outlook.com>2015-11-03 08:56:56 +0100
committerest31 <MTest31@outlook.com>2015-11-03 19:07:45 +0100
commitf9b09368f063cdace93a042d5bdd45987c084d94 (patch)
treeae42f1d9e6a9c0a3370c9badf8bc1e9602fd2a63 /src/server.cpp
parentabc354a5d0a941cf1f3877e487cce325cc609ba8 (diff)
downloadminetest-f9b09368f063cdace93a042d5bdd45987c084d94.tar.gz
minetest-f9b09368f063cdace93a042d5bdd45987c084d94.tar.bz2
minetest-f9b09368f063cdace93a042d5bdd45987c084d94.zip
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.
Diffstat (limited to 'src/server.cpp')
-rw-r--r--src/server.cpp5
1 files changed, 0 insertions, 5 deletions
diff --git a/src/server.cpp b/src/server.cpp
index 327591c60..8c42ab5fd 100644
--- a/src/server.cpp
+++ b/src/server.cpp
@@ -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)