From bbb0379813c3a2fa0ea35de39fb5aa5e1b621966 Mon Sep 17 00:00:00 2001 From: NepDisk <16447892+NepDisk@users.noreply.github.com> Date: Sat, 22 Jun 2024 19:21:21 -0400 Subject: [PATCH] Allow Users to Connect to Servers While In-Game https://git.do.srb2.org/STJr/SRB2/-/merge_requests/2401/ --- src/d_clisrv.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/d_clisrv.c b/src/d_clisrv.c index aa5381ee1..8e4621786 100644 --- a/src/d_clisrv.c +++ b/src/d_clisrv.c @@ -23,6 +23,7 @@ #include "d_netfil.h" // fileneedednum #include "d_main.h" #include "g_game.h" +#include "m_menu.h" // M_ClearMenus #include "hu_stuff.h" #include "keys.h" #include "g_input.h" // JOY1 @@ -3046,8 +3047,17 @@ static void Command_connect(void) if (Playing() || demo.title) { - CONS_Printf(M_GetText("You cannot connect while in a game. End this game first.\n")); - return; + M_ClearMenus(true); + if (demo.title) + G_CheckDemoStatus(); + + if (netgame) + { + D_QuitNetGame(); + CL_Reset(); + } + + D_StartTitle(); } // modified game check: no longer handled