From 658c3e0556dfb1fdb92ac95ac05671bd49c937be Mon Sep 17 00:00:00 2001 From: tritonas00 Date: Wed, 6 Apr 2022 22:00:58 +0300 Subject: [PATCH] network quality fixes --- source/main/gui/panels/GUI_MultiplayerClientList.cpp | 5 +++++ source/main/network/Network.cpp | 1 + 2 files changed, 6 insertions(+) diff --git a/source/main/gui/panels/GUI_MultiplayerClientList.cpp b/source/main/gui/panels/GUI_MultiplayerClientList.cpp index b8822f0596..366fafc4d4 100644 --- a/source/main/gui/panels/GUI_MultiplayerClientList.cpp +++ b/source/main/gui/panels/GUI_MultiplayerClientList.cpp @@ -65,6 +65,11 @@ void MpClientList::Draw() int y = 20 + (ImGui::GetTextLineHeightWithSpacing() * m_users.size()); + if (App::GetNetwork()->GetNetQuality() != 0) + { + y += 20; + } + ImGui::SetNextWindowSize(ImVec2((content_width + (2*ImGui::GetStyle().WindowPadding.x)), y)); ImGui::PushStyleColor(ImGuiCol_WindowBg, theme.semitransparent_window_bg); ImGui::Begin("Peers", nullptr, flags); diff --git a/source/main/network/Network.cpp b/source/main/network/Network.cpp index c98cd44fa7..25d603bfa8 100644 --- a/source/main/network/Network.cpp +++ b/source/main/network/Network.cpp @@ -590,6 +590,7 @@ void Network::Disconnect() m_socket.close_fd(); } + SetNetQuality(0); m_users.clear(); m_disconnected_users.clear(); m_recv_packet_buffer.clear();