[Browser] Do not allow to connect to unreachable servers

0.6.1
Koncord 8 years ago
parent f8c6ed8028
commit 4082cddde5

@ -36,7 +36,9 @@ void ServerInfoDialog::refresh()
{
leAddr->setText(sd.first.ToString(true, ':'));
lblName->setText(sd.second.GetName());
lblPing->setNum((int) PingRakNetServer(sd.first.ToString(false), sd.first.GetPort()));
int ping = PingRakNetServer(sd.first.ToString(false), sd.first.GetPort());
lblPing->setNum(ping);
btnConnect->setDisabled(ping == PING_UNREACHABLE);
listPlayers->clear();

Loading…
Cancel
Save