1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-11 17:51:04 +00:00

Fix various code & correctness issues (#11815)

This commit is contained in:
sfan5 2021-12-05 14:40:30 +01:00 committed by GitHub
parent 7a043b3ebb
commit ff934d538c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 30 additions and 37 deletions

View file

@ -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();
}