Fix game restart after curl download finished

This commit is contained in:
Thilo Schulz 2011-08-02 23:34:50 +00:00
parent 702c519057
commit 0bc54ab696

View file

@ -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);