aboutsummaryrefslogtreecommitdiff
path: root/src/server.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/server.cpp')
-rw-r--r--src/server.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/server.cpp b/src/server.cpp
index 322af2012..e899443f4 100644
--- a/src/server.cpp
+++ b/src/server.cpp
@@ -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;
{