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:
parent
7a043b3ebb
commit
ff934d538c
8 changed files with 30 additions and 37 deletions
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue