mirror of
https://github.com/luanti-org/luanti.git
synced 2025-11-30 12:43:49 +01:00
Fix various code & correctness issues (#11815)
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user