diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/npc.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/npc.cpp b/src/npc.cpp index 3f9a1601..5efee873 100644 --- a/src/npc.cpp +++ b/src/npc.cpp @@ -86,10 +86,12 @@ void NPC::setName(const std::string &name) { delete mName; } - mName = new Text(name, mPx + NAME_X_OFFSET, mPy + NAME_Y_OFFSET, + std::string displayName = name.substr(0, name.find('#', 0)); + + mName = new Text(displayName, mPx + NAME_X_OFFSET, mPy + NAME_Y_OFFSET, gcn::Graphics::CENTER, npcNameFont, gcn::Color(200, 200, 255)); - Being::setName(name + " (NPC)"); + Being::setName(displayName + " (NPC)"); } Being::Type |