diff options
author | Franz Reiter <franzi.moos@googlemail.com> | 2014-09-23 15:54:07 +0200 |
---|---|---|
committer | Franz Reiter <franzi.moos@googlemail.com> | 2014-09-23 15:54:07 +0200 |
commit | 33f8091d5f550a91b1fbe24f07a397aa5a336093 (patch) | |
tree | 4fe1be83dd4212e010fed749cd444c4deecc64e6 /src/World.cpp | |
parent | QtBiomeVisualiser: Fixed confusion about Globals.h. (diff) | |
parent | Fixed SQLiteCpp downgrade (diff) | |
download | cuberite-33f8091d5f550a91b1fbe24f07a397aa5a336093.tar cuberite-33f8091d5f550a91b1fbe24f07a397aa5a336093.tar.gz cuberite-33f8091d5f550a91b1fbe24f07a397aa5a336093.tar.bz2 cuberite-33f8091d5f550a91b1fbe24f07a397aa5a336093.tar.lz cuberite-33f8091d5f550a91b1fbe24f07a397aa5a336093.tar.xz cuberite-33f8091d5f550a91b1fbe24f07a397aa5a336093.tar.zst cuberite-33f8091d5f550a91b1fbe24f07a397aa5a336093.zip |
Diffstat (limited to 'src/World.cpp')
-rw-r--r-- | src/World.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/World.cpp b/src/World.cpp index 71ce7e680..8664bbec6 100644 --- a/src/World.cpp +++ b/src/World.cpp @@ -3288,13 +3288,17 @@ void cWorld::TabCompleteUserName(const AString & a_Text, AStringVector & a_Resul for (cPlayerList::iterator itr = m_Players.begin(), end = m_Players.end(); itr != end; ++itr) { AString PlayerName ((*itr)->GetName()); + if ((*itr)->HasCustomName()) + { + PlayerName = (*itr)->GetCustomName(); + } + AString::size_type Found = PlayerName.find(LastWord); // Try to find last word in playername - if (Found == AString::npos) { continue; // No match } - + UsernamesByWeight.push_back(std::make_pair(Found, PlayerName)); // Match! Store it with the position of the match as a weight } Lock.Unlock(); |