Skip to content

Commit

Permalink
network quality fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
tritonas00 committed Apr 6, 2022
1 parent eed02ff commit 658c3e0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions source/main/gui/panels/GUI_MultiplayerClientList.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
1 change: 1 addition & 0 deletions source/main/network/Network.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 658c3e0

Please # to comment.