From 4221c1b4412f2bf889bd603a26424003f5367f6a Mon Sep 17 00:00:00 2001 From: red-001 Date: Thu, 8 Jun 2017 14:30:09 +0100 Subject: Have the server send the player list to the client (#5924) * Have the server send the player list to the client Currently the client generates the player list based on the Client active object list, the issue with this is that we can't be sure all player active objects will be sent to the client, so this could result in players showing up when someone run `/status` but auto complete not working with their nick and CSM not being aware of the player --- src/content_cao.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/content_cao.cpp') diff --git a/src/content_cao.cpp b/src/content_cao.cpp index c904082d6..a5a55fd7e 100644 --- a/src/content_cao.cpp +++ b/src/content_cao.cpp @@ -624,7 +624,8 @@ void GenericCAO::initialize(const std::string &data) m_is_visible = false; player->setCAO(this); } - m_env->addPlayerName(m_name.c_str()); + if (m_client->getProtoVersion() < 33) + m_env->addPlayerName(m_name.c_str()); } } @@ -667,7 +668,7 @@ void GenericCAO::processInitData(const std::string &data) GenericCAO::~GenericCAO() { - if (m_is_player) { + if (m_is_player && m_client->getProtoVersion() < 33) { m_env->removePlayerName(m_name.c_str()); } removeFromScene(true); -- cgit v1.2.3