Show rooms list in server browser initially

If you haven't selected a room yet, you're
shown the room list instead of server list.
This commit is contained in:
James R 2019-04-18 22:41:50 -07:00
parent db18492836
commit 4b05199b9f

View file

@ -7456,6 +7456,9 @@ static void M_ConnectMenu(INT32 choice)
// first page of servers
serverlistpage = 0;
if (ms_RoomId < 0)
M_RoomMenu(0); // Select a room instead of staring at an empty list
else
M_SetupNextMenu(&MP_ConnectDef);
itemOn = 0;
M_Refresh(0);
@ -7529,6 +7532,14 @@ static void M_ChooseRoom(INT32 choice)
}
serverlistpage = 0;
/*
We were on the Multiplayer menu? That means that we must have been trying to
view the server browser, but we hadn't selected a room yet. So we need to go
to the browser next, not back there.
*/
if (currentMenu->prevMenu == &MP_MainDef)
M_SetupNextMenu(&MP_ConnectDef);
else
M_SetupNextMenu(currentMenu->prevMenu);
if (currentMenu == &MP_ConnectDef)
M_Refresh(0);