mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Maybe fixed the flood of "WARNING: StaticObjectList::remove(): id=13 not found" style debug messages on the server when a player has quit.
This commit is contained in:
parent
8377b5f2a6
commit
288822e73d
2 changed files with 76 additions and 2 deletions
|
@ -4266,6 +4266,23 @@ void Server::handlePeerChange(PeerChange &c)
|
|||
// The client should exist
|
||||
assert(n != NULL);
|
||||
|
||||
/*
|
||||
Mark objects to be not known by the client
|
||||
*/
|
||||
RemoteClient *client = n->getValue();
|
||||
// Handle objects
|
||||
for(core::map<u16, bool>::Iterator
|
||||
i = client->m_known_objects.getIterator();
|
||||
i.atEnd()==false; i++)
|
||||
{
|
||||
// Get object
|
||||
u16 id = i.getNode()->getKey();
|
||||
ServerActiveObject* obj = m_env.getActiveObject(id);
|
||||
|
||||
if(obj && obj->m_known_by_count > 0)
|
||||
obj->m_known_by_count--;
|
||||
}
|
||||
|
||||
// Collect information about leaving in chat
|
||||
std::wstring message;
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue