mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-15 09:11:48 +00:00
Add warning message when attempting to use the master server browser while modifiedgame
is true.
This commit is contained in:
parent
b4d8126675
commit
7e47117afa
1 changed files with 17 additions and 2 deletions
19
src/m_menu.c
19
src/m_menu.c
|
@ -265,6 +265,7 @@ static void M_ServerOptions(INT32 choice);
|
|||
#ifndef NONET
|
||||
static void M_StartServerMenu(INT32 choice);
|
||||
static void M_ConnectMenu(INT32 choice);
|
||||
static void M_ConnectMenuModChecks(INT32 choice);
|
||||
static void M_Refresh(INT32 choice);
|
||||
static void M_Connect(INT32 choice);
|
||||
static void M_ChooseRoom(INT32 choice);
|
||||
|
@ -885,7 +886,7 @@ static menuitem_t MP_SplitServerMenu[] =
|
|||
static menuitem_t MP_MainMenu[] =
|
||||
{
|
||||
{IT_HEADER, NULL, "Join a game", NULL, 0},
|
||||
{IT_STRING|IT_CALL, NULL, "Server browser...", M_ConnectMenu, 12},
|
||||
{IT_STRING|IT_CALL, NULL, "Server browser...", M_ConnectMenuModChecks, 12},
|
||||
{IT_STRING|IT_KEYHANDLER, NULL, "Specify IPv4 address:", M_HandleConnectIP, 22},
|
||||
{IT_HEADER, NULL, "Host a game", NULL, 54},
|
||||
{IT_STRING|IT_CALL, NULL, "Internet/LAN...", M_StartServerMenu, 66},
|
||||
|
@ -5603,7 +5604,7 @@ static boolean M_AddonsRefresh(void)
|
|||
{
|
||||
S_StartSound(NULL, sfx_lose);
|
||||
if (refreshdirmenu & REFRESHDIR_MAX)
|
||||
message = va("%c%s\x80\nMaximum number of add-ons reached.\nA file could not be loaded.\nIf you want to play with this add-on, restart the game to clear existing ones.\n\n(Press a key)\n", ('\x80' + (highlightflags>>V_CHARCOLORSHIFT)), refreshdirname);
|
||||
message = va("%c%s\x80\nMaximum number of add-ons reached.\nA file could not be loaded.\nif you wish to play with this add-on, restart the game to clear existing ones.\n\n(Press a key)\n", ('\x80' + (highlightflags>>V_CHARCOLORSHIFT)), refreshdirname);
|
||||
else
|
||||
message = va("%c%s\x80\nA file was not loaded.\nCheck the console log for more information.\n\n(Press a key)\n", ('\x80' + (highlightflags>>V_CHARCOLORSHIFT)), refreshdirname);
|
||||
}
|
||||
|
@ -9034,6 +9035,20 @@ static void M_ConnectMenu(INT32 choice)
|
|||
M_Refresh(0);
|
||||
}
|
||||
|
||||
static void M_ConnectMenuModChecks(INT32 choice)
|
||||
{
|
||||
(void)choice;
|
||||
// okay never mind we want to COMMUNICATE to the player pre-emptively instead of letting them try and then get confused when it doesn't work
|
||||
|
||||
if (modifiedgame)
|
||||
{
|
||||
M_StartMessage(M_GetText("Add-ons are currently loaded.\n\nYou will only be able to join a server if\nit has the same ones loaded in the same order, which may be unlikely.\n\nIf you wish to play on other servers,\nrestart the game to clear existing add-ons.\n\n(Press a key)\n"),M_ConnectMenu,MM_EVENTHANDLER);
|
||||
return;
|
||||
}
|
||||
|
||||
M_ConnectMenu(-1);
|
||||
}
|
||||
|
||||
static UINT32 roomIds[NUM_LIST_ROOMS];
|
||||
|
||||
static void M_RoomMenu(INT32 choice)
|
||||
|
|
Loading…
Reference in a new issue