mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-15 09:11:48 +00:00
Skip empty gametypes in level select menu
This commit is contained in:
parent
0770f77371
commit
1848ce4b97
1 changed files with 17 additions and 2 deletions
15
src/m_menu.c
15
src/m_menu.c
|
@ -5045,6 +5045,17 @@ static boolean M_SetNextMapOnPlatter(void)
|
|||
}
|
||||
#endif
|
||||
|
||||
static boolean M_GametypeHasLevels(INT32 gt)
|
||||
{
|
||||
INT32 mapnum;
|
||||
|
||||
for (mapnum = 0; mapnum < NUMMAPS; mapnum++)
|
||||
if (M_CanShowLevelOnPlatter(mapnum, gt))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
static INT32 M_CountRowsToShowOnPlatter(INT32 gt)
|
||||
{
|
||||
INT32 mapnum = 0, prevmapnum = 0, col = 0, rows = 0;
|
||||
|
@ -5362,7 +5373,9 @@ static void M_HandleLevelPlatter(INT32 choice)
|
|||
case KEY_RIGHTARROW:
|
||||
if (levellistmode == LLM_CREATESERVER && !lsrow)
|
||||
{
|
||||
do
|
||||
CV_AddValue(&cv_newgametype, 1);
|
||||
while (!M_GametypeHasLevels(cv_newgametype.value));
|
||||
S_StartSound(NULL,sfx_menu1);
|
||||
lscol = 0;
|
||||
|
||||
|
@ -5391,7 +5404,9 @@ static void M_HandleLevelPlatter(INT32 choice)
|
|||
case KEY_LEFTARROW:
|
||||
if (levellistmode == LLM_CREATESERVER && !lsrow)
|
||||
{
|
||||
do
|
||||
CV_AddValue(&cv_newgametype, -1);
|
||||
while (!M_GametypeHasLevels(cv_newgametype.value));
|
||||
S_StartSound(NULL,sfx_menu1);
|
||||
lscol = 0;
|
||||
|
||||
|
|
Loading…
Reference in a new issue