diff options
Diffstat (limited to 'src/server.cpp')
-rw-r--r-- | src/server.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/server.cpp b/src/server.cpp index 5022221ee..c175cbcd2 100644 --- a/src/server.cpp +++ b/src/server.cpp @@ -517,9 +517,7 @@ void Server::stop() // Stop threads (set run=false first so both start stopping) m_thread->stop(); - //m_emergethread.setRun(false); m_thread->wait(); - //m_emergethread.stop(); infostream<<"Server: Threads stopped"<<std::endl; } @@ -954,14 +952,14 @@ void Server::AsyncRunStep(bool initial_step) } /* - Trigger emergethread (it somehow gets to a non-triggered but - bysy state sometimes) + Trigger emerge thread + Doing this every 2s is left over from old code, unclear if this is still needed. */ { float &counter = m_emergethread_trigger_timer; - counter += dtime; - if (counter >= 2.0) { - counter = 0.0; + counter -= dtime; + if (counter <= 0.0f) { + counter = 2.0f; m_emerge->startThreads(); } |