mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-11 17:51:04 +00:00
Drop less performant Server::setBlockNotSent for ClientInterface::markBlockposAsNotSent
This commit is contained in:
parent
b592c52f1c
commit
6036f865cb
4 changed files with 17 additions and 20 deletions
|
@ -648,6 +648,15 @@ std::vector<session_t> ClientInterface::getClientIDs(ClientState min_state)
|
|||
return reply;
|
||||
}
|
||||
|
||||
void ClientInterface::markBlockposAsNotSent(const v3s16 &pos)
|
||||
{
|
||||
MutexAutoLock clientslock(m_clients_mutex);
|
||||
for (const auto &client : m_clients) {
|
||||
if (client.second->getState() >= CS_Active)
|
||||
client.second->SetBlockNotSent(pos);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Verify if user limit was reached.
|
||||
* User limit count all clients from HelloSent state (MT protocol user) to Active state
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue