From 0bc54ab6963b157b81ce93f94af80de61663962c Mon Sep 17 00:00:00 2001 From: Thilo Schulz Date: Tue, 2 Aug 2011 23:34:50 +0000 Subject: [PATCH] Fix game restart after curl download finished --- code/client/cl_main.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/code/client/cl_main.c b/code/client/cl_main.c index e9f606a5..fcadaf4e 100644 --- a/code/client/cl_main.c +++ b/code/client/cl_main.c @@ -146,7 +146,7 @@ int serverStatusCount; void hA3Dg_ExportRenderGeom (refexport_t *incoming_re); #endif -static int isQuitting = qfalse; +static int noGameRestart = qfalse; extern void SV_BotFrame( int time ); void CL_CheckForResend( void ); @@ -1477,8 +1477,10 @@ void CL_Disconnect( qboolean showMainMenu ) { CL_UpdateGUID( NULL, 0 ); - if(!isQuitting) + if(!noGameRestart) CL_OldGame(); + else + noGameRestart = qfalse; } @@ -1732,6 +1734,7 @@ void CL_Connect_f( void ) { Cvar_Set( "sv_killserver", "1" ); SV_Frame( 0 ); + noGameRestart = qtrue; CL_Disconnect( qtrue ); Con_Close(); @@ -3652,7 +3655,7 @@ void CL_Shutdown(char *finalmsg, qboolean disconnect, qboolean quit) } recursive = qtrue; - isQuitting = quit; + noGameRestart = quit; if(disconnect) CL_Disconnect(qtrue);