1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Use multiple threads for mesh generation (#13062)

Co-authored-by: sfan5 <sfan5@live.de>
This commit is contained in:
x2048 2022-12-27 18:44:18 +01:00 committed by GitHub
parent 03e710160f
commit 89e7f72c92
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 183 additions and 57 deletions

View file

@ -673,7 +673,7 @@ void Client::handleCommand_AnnounceMedia(NetworkPacket* pkt)
// Mesh update thread must be stopped while
// updating content definitions
sanity_check(!m_mesh_update_thread.isRunning());
sanity_check(!m_mesh_update_manager.isRunning());
for (u16 i = 0; i < num_files; i++) {
std::string name, sha1_base64;
@ -733,7 +733,7 @@ void Client::handleCommand_Media(NetworkPacket* pkt)
if (init_phase) {
// Mesh update thread must be stopped while
// updating content definitions
sanity_check(!m_mesh_update_thread.isRunning());
sanity_check(!m_mesh_update_manager.isRunning());
}
for (u32 i = 0; i < num_files; i++) {
@ -770,7 +770,7 @@ void Client::handleCommand_NodeDef(NetworkPacket* pkt)
// Mesh update thread must be stopped while
// updating content definitions
sanity_check(!m_mesh_update_thread.isRunning());
sanity_check(!m_mesh_update_manager.isRunning());
// Decompress node definitions
std::istringstream tmp_is(pkt->readLongString(), std::ios::binary);
@ -789,7 +789,7 @@ void Client::handleCommand_ItemDef(NetworkPacket* pkt)
// Mesh update thread must be stopped while
// updating content definitions
sanity_check(!m_mesh_update_thread.isRunning());
sanity_check(!m_mesh_update_manager.isRunning());
// Decompress item definitions
std::istringstream tmp_is(pkt->readLongString(), std::ios::binary);