diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-01-26 14:15:34 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-01-26 14:45:25 +0300 |
commit | 5d43f16fea7f97f3302b89d64c165b7c5b5222dc (patch) | |
tree | 386d26ecf76fc1e44b1319ce1f1595b48d6c5c45 /src/gui | |
parent | 85d58aef208ae7c1f0ef5d449e17a1410a6eb04d (diff) | |
download | manaverse-5d43f16fea7f97f3302b89d64c165b7c5b5222dc.tar.gz manaverse-5d43f16fea7f97f3302b89d64c165b7c5b5222dc.tar.bz2 manaverse-5d43f16fea7f97f3302b89d64c165b7c5b5222dc.tar.xz manaverse-5d43f16fea7f97f3302b89d64c165b7c5b5222dc.zip |
Fix show ping time if timer overflowed and still no response from server.
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/debugwindow.cpp | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/src/gui/debugwindow.cpp b/src/gui/debugwindow.cpp index 39ee07767..1a957345a 100644 --- a/src/gui/debugwindow.cpp +++ b/src/gui/debugwindow.cpp @@ -412,16 +412,8 @@ NetDebugTab::NetDebugTab(const Widget2 *const widget) : void NetDebugTab::logic() { - if (player_node && player_node->getPingTime() != 0) - { - mPingLabel->setCaption(strprintf(_("Ping: %s ms"), - toString(static_cast<int>(player_node->getPingTime())).c_str())); - } - else - { - mPingLabel->setCaption(strprintf(_("Ping: %s ms"), "?")); - } - + mPingLabel->setCaption(strprintf(_("Ping: %s ms"), + player_node->getPingTime().c_str())); mInPackets1Label->setCaption(strprintf(_("In: %d bytes/s"), PacketCounters::getInBytes())); mOutPackets1Label->setCaption(strprintf(_("Out: %d bytes/s"), |