mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-06-21 15:45:59 +00:00
Lobby cleanup.
Actually define these variables and revert to sorting by state for gamelists by default (despite not having a column to sort for that). This was SVN commit r17387.
This commit is contained in:
@@ -448,6 +448,7 @@ function updateGameList()
|
||||
g_SelectedGameIP = g_GameList[gamesBox.selected].ip;
|
||||
|
||||
g_GameList = Engine.GetGameList().filter(game => !filterGame(game)).sort((a, b) => {
|
||||
var sortA, sortB;
|
||||
switch (g_GameListSortBy)
|
||||
{
|
||||
case 'name':
|
||||
@@ -465,6 +466,10 @@ function updateGameList()
|
||||
sortA = a.nbp * b.tnbp;
|
||||
sortB = b.nbp * a.tnbp;
|
||||
break;
|
||||
default:
|
||||
sortA = gameStatuses.indexOf(a.state);
|
||||
sortB = gameStatuses.indexOf(b.state);
|
||||
break;
|
||||
}
|
||||
if (sortA < sortB) return -g_GameListOrder;
|
||||
if (sortA > sortB) return +g_GameListOrder;
|
||||
|
||||
Reference in New Issue
Block a user