mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Mark liquid and light updates low priority
This commit is contained in:
parent
2a3427a39c
commit
00addc3e5d
5 changed files with 29 additions and 20 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue