diff options
author | Chuck Miller <shadowmil@gmail.com> | 2009-05-05 17:49:40 -0400 |
---|---|---|
committer | Chuck Miller <shadowmil@gmail.com> | 2009-05-05 17:49:40 -0400 |
commit | 5a9759680427154f379499cb3268f307bb860c22 (patch) | |
tree | 961d84725e272b4820c200622aea1190551794af | |
parent | 49eb5513a6b4ae8476f04b4c7c60c45715cf0e62 (diff) | |
download | mana-5a9759680427154f379499cb3268f307bb860c22.tar.gz mana-5a9759680427154f379499cb3268f307bb860c22.tar.bz2 mana-5a9759680427154f379499cb3268f307bb860c22.tar.xz mana-5a9759680427154f379499cb3268f307bb860c22.zip |
Fixed hidding showing player names
-rw-r--r-- | src/player.cpp | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/player.cpp b/src/player.cpp index 594b3680..14a9c97f 100644 --- a/src/player.cpp +++ b/src/player.cpp @@ -20,6 +20,7 @@ */ #include "animatedsprite.h" +#include "configuration.h" #include "game.h" #ifdef TMWSERV_SUPPORT #include "guild.h" @@ -74,8 +75,8 @@ void Player::setName(const std::string &name) &guiPalette->getColor(Palette::SELF) : &guiPalette->getColor(Palette::PC)); } - Being::setName(name); } + Being::setName(name); } #ifdef EATHENA_SUPPORT @@ -134,6 +135,18 @@ void Player::logic() break; } + if (getType() == Being::PLAYER && player_node != this) + { + if (!config.getValue("visiblenames", 1) && mName) + { + delete mName; + mName = NULL; + } + else if (config.getValue("visiblenames", 1) && !mName && !(getName().empty())) + { + setName(getName()); + } + } Being::logic(); } #endif |