mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-15 09:25:37 +02:00
Make MapEditEvent more complete
SetBlocksNotSent is no longer used.
This commit is contained in:
@@ -722,8 +722,15 @@ void *EmergeThread::run()
|
||||
if (block)
|
||||
modified_blocks[pos] = block;
|
||||
|
||||
if (!modified_blocks.empty())
|
||||
m_server->SetBlocksNotSent(modified_blocks);
|
||||
if (!modified_blocks.empty()) {
|
||||
MapEditEvent event;
|
||||
event.type = MEET_OTHER;
|
||||
for (const auto &pair : modified_blocks) {
|
||||
event.modified_blocks.insert(pair.first);
|
||||
}
|
||||
MutexAutoLock envlock(m_server->m_env_mutex);
|
||||
m_map->dispatchEvent(event);
|
||||
}
|
||||
modified_blocks.clear();
|
||||
}
|
||||
} catch (VersionMismatchException &e) {
|
||||
|
Reference in New Issue
Block a user