summaryrefslogtreecommitdiff
path: root/src/client.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/client.cpp')
-rw-r--r--src/client.cpp18
1 files changed, 16 insertions, 2 deletions
diff --git a/src/client.cpp b/src/client.cpp
index b830bcdf3..721c413c0 100644
--- a/src/client.cpp
+++ b/src/client.cpp
@@ -286,6 +286,20 @@ Client::Client(
}
}
+void Client::Stop()
+{
+ //request all client managed threads to stop
+ m_mesh_update_thread.Stop();
+}
+
+bool Client::isShutdown()
+{
+
+ if (!m_mesh_update_thread.IsRunning()) return true;
+
+ return false;
+}
+
Client::~Client()
{
{
@@ -296,7 +310,7 @@ Client::~Client()
m_mesh_update_thread.Stop();
m_mesh_update_thread.Wait();
while(!m_mesh_update_thread.m_queue_out.empty()) {
- MeshUpdateResult r = m_mesh_update_thread.m_queue_out.pop_front();
+ MeshUpdateResult r = m_mesh_update_thread.m_queue_out.pop_frontNoEx();
delete r.mesh;
}
@@ -692,7 +706,7 @@ void Client::step(float dtime)
while(!m_mesh_update_thread.m_queue_out.empty())
{
num_processed_meshes++;
- MeshUpdateResult r = m_mesh_update_thread.m_queue_out.pop_front();
+ MeshUpdateResult r = m_mesh_update_thread.m_queue_out.pop_frontNoEx();
MapBlock *block = m_env.getMap().getBlockNoCreateNoEx(r.p);
if(block)
{