Skip to content

Commit 440218b

Browse files
committed
Sort communities by current number of players
1 parent 75153f5 commit 440218b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/engine/client/serverbrowser.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -607,6 +607,10 @@ void CServerBrowser::Filter()
607607
}
608608
}
609609
}
610+
611+
std::stable_sort(m_vCommunities.begin(), m_vCommunities.end(), [](const CCommunity &Lhs, const CCommunity &Rhs) {
612+
return Lhs.NumPlayers() > Rhs.NumPlayers();
613+
});
610614
}
611615

612616
int CServerBrowser::SortHash() const

0 commit comments

Comments
 (0)