summaryrefslogtreecommitdiff
path: root/src/client.h
diff options
context:
space:
mode:
authorest31 <MTest31@outlook.com>2015-06-29 11:06:03 +0200
committerest31 <MTest31@outlook.com>2015-06-29 15:00:19 +0200
commit29dda9f356042c403b3b7da1d717d32b45c9b6de (patch)
treeac063171e654443370691468175502bd221ac979 /src/client.h
parent4e28c8d3c8af51b728a049c28806e0f740ac0106 (diff)
downloadminetest-29dda9f356042c403b3b7da1d717d32b45c9b6de.tar.gz
minetest-29dda9f356042c403b3b7da1d717d32b45c9b6de.tar.bz2
minetest-29dda9f356042c403b3b7da1d717d32b45c9b6de.zip
Add UpdateThread and use it for minimap and mesh threads
Diffstat (limited to 'src/client.h')
-rw-r--r--src/client.h20
1 files changed, 12 insertions, 8 deletions
diff --git a/src/client.h b/src/client.h
index 474daf3bc..efd373e42 100644
--- a/src/client.h
+++ b/src/client.h
@@ -113,23 +113,27 @@ struct MeshUpdateResult
}
};
-class MeshUpdateThread : public JThread
+class MeshUpdateThread : public UpdateThread
{
+private:
+ MeshUpdateQueue m_queue_in;
+
+protected:
+ const char *getName()
+ { return "MeshUpdateThread"; }
+ virtual void doUpdate();
+
public:
- MeshUpdateThread(IGameDef *gamedef):
- m_gamedef(gamedef)
+ MeshUpdateThread()
{
}
- void * Thread();
-
- MeshUpdateQueue m_queue_in;
+ void enqueueUpdate(v3s16 p, MeshMakeData *data,
+ bool ack_block_to_server, bool urgent);
MutexedQueue<MeshUpdateResult> m_queue_out;
- IGameDef *m_gamedef;
-
v3s16 m_camera_offset;
};