diff options
Diffstat (limited to 'src/being.cpp')
-rw-r--r-- | src/being.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/being.cpp b/src/being.cpp index d2dfc855..a3e91147 100644 --- a/src/being.cpp +++ b/src/being.cpp @@ -987,16 +987,21 @@ void Being::showName() if (getType() == PLAYER) { - if (config.getValue("showgender", false)) + Player* player = static_cast<Player*>(this); + if (player) { - Player* player = static_cast<Player*>(this); - if (player) + if (config.getValue("showgender", false)) { if (player->getGender() == GENDER_FEMALE) mDisplayName += " \u2640"; else mDisplayName += " \u2642"; } + if (Net::getNetworkType() == ServerInfo::TMWATHENA && player_node + && player_node->getShowIp() && player->getIp()) + { + mDisplayName += strprintf(" %s", ipToString(player->getIp())); + } } } else if (getType() == MONSTER) |