From 6036f865cba44fd26374a3a649370f51d5d4ff6c Mon Sep 17 00:00:00 2001 From: Loic Blot Date: Thu, 8 Mar 2018 22:58:43 +0100 Subject: Drop less performant Server::setBlockNotSent for ClientInterface::markBlockposAsNotSent --- src/clientiface.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/clientiface.cpp') diff --git a/src/clientiface.cpp b/src/clientiface.cpp index a3c44fb9e..3a6caf800 100644 --- a/src/clientiface.cpp +++ b/src/clientiface.cpp @@ -648,6 +648,15 @@ std::vector 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 -- cgit v1.2.3