fix "connect" command not saving to last server

This commit is contained in:
Alug committed 2025-01-08 03:23:37 +01:00
1 parent cdfef0f884
commit d01ed38895
3 files changed
+2 -8

No files matched your search

+2
View File
@@ -3132,6 +3132,8 @@ static void Command_connect(void)
CONS_Alert(CONS_ERROR, M_GetText("There is no network driver\n"));
}
CV_Set(&cv_lastserver, I_GetNodeAddress(servernode));
if (splitscreen != cv_splitplayers.value-1)
{
splitscreen = cv_splitplayers.value-1;
-4
View File
@@ -1669,7 +1669,6 @@ boolean I_InitTcpNetwork(void)
// server address only in ip
if (serverhostname[0])
{
CV_Set(&cv_lastserver, serverhostname);
COM_BufAddText("connect \"");
COM_BufAddText(serverhostname);
COM_BufAddText("\"\n");
@@ -1679,9 +1678,6 @@ boolean I_InitTcpNetwork(void)
}
else
{
// Not quite sure if we want to save that but i'll do that for now
CV_Set(&cv_lastserver, "any");
// so we're on a LAN
COM_BufAddText("connect any\n");
-4
View File
@@ -9433,9 +9433,6 @@ static void M_Connect(INT32 choice)
{
// do not call menuexitfunc
M_ClearMenus(false);
CV_Set(&cv_lastserver, I_GetNodeAddress(serverlist[choice-FIRSTSERVERLINE + serverlistpage * SERVERS_PER_PAGE].node));
COM_BufAddText(va("connect node %d\n", serverlist[choice-FIRSTSERVERLINE + serverlistpage * SERVERS_PER_PAGE].node));
}
@@ -10364,7 +10361,6 @@ static void M_ConnectIP(INT32 choice)
M_ClearMenus(true);
CV_Set(&cv_lastserver,setupm_ip);
COM_BufAddText(va("connect \"%s\"\n", setupm_ip));
// A little "please wait" message.