From 05aec1cd94011031023d54cd84038c150c0784bf Mon Sep 17 00:00:00 2001 From: Indev Date: Wed, 31 Jan 2024 18:51:37 +0300 Subject: [PATCH] When connecting to server via -connect flag, save ip into lastserver cvar --- src/i_tcp.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/i_tcp.c b/src/i_tcp.c index 1ebffc59b..81c221d27 100644 --- a/src/i_tcp.c +++ b/src/i_tcp.c @@ -1722,6 +1722,7 @@ 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"); @@ -1731,6 +1732,9 @@ 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");