From b0e68060777dfb7daefc81c169e1ed4d95c4a2d6 Mon Sep 17 00:00:00 2001 From: PilzAdam Date: Mon, 25 Mar 2013 19:13:25 +0100 Subject: Fix nick completion --- src/content_cao.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/content_cao.cpp') diff --git a/src/content_cao.cpp b/src/content_cao.cpp index 0a1a92271..8bec67c8c 100644 --- a/src/content_cao.cpp +++ b/src/content_cao.cpp @@ -708,11 +708,15 @@ public: if(player && player->isLocal()){ m_is_local_player = true; } + m_env->addPlayerName(m_name.c_str()); } } ~GenericCAO() { + if(m_is_player){ + m_env->removePlayerName(m_name.c_str()); + } } static ClientActiveObject* create(IGameDef *gamedef, ClientEnvironment *env) -- cgit v1.2.3