mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 16:45:20 +02:00
Mark liquid and light updates low priority
This commit is contained in:
@@ -755,6 +755,7 @@ void Server::AsyncRunStep(float dtime, bool initial_step)
|
||||
if (!modified_blocks.empty()) {
|
||||
MapEditEvent event;
|
||||
event.type = MEET_OTHER;
|
||||
event.low_priority = true;
|
||||
event.setModifiedBlocks(modified_blocks);
|
||||
m_env->getMap().dispatchEvent(event);
|
||||
}
|
||||
@@ -1006,7 +1007,7 @@ void Server::AsyncRunStep(float dtime, bool initial_step)
|
||||
}
|
||||
case MEET_OTHER:
|
||||
prof.add("MEET_OTHER", 1);
|
||||
m_clients.markBlocksNotSent(event->modified_blocks);
|
||||
m_clients.markBlocksNotSent(event->modified_blocks, event->low_priority);
|
||||
break;
|
||||
default:
|
||||
prof.add("unknown", 1);
|
||||
@@ -1022,7 +1023,7 @@ void Server::AsyncRunStep(float dtime, bool initial_step)
|
||||
*/
|
||||
for (const u16 far_player : far_players) {
|
||||
if (RemoteClient *client = getClient(far_player))
|
||||
client->SetBlocksNotSent(event->modified_blocks);
|
||||
client->SetBlocksNotSent(event->modified_blocks, event->low_priority);
|
||||
}
|
||||
|
||||
delete event;
|
||||
|
Reference in New Issue
Block a user