- Fix already defined command warnings for minimize

- Fix recursive CL_Shutdown warning and "command already defined" warnings when quitting while playing on a server that changed the gamedir.
This commit is contained in:
Thilo Schulz committed 2011-08-01 10:16:40 +00:00
1 parent 404fe4e6e0
commit 8ab91bde8e
6 files changed
+17 -11

No files matched your search

+8 -3
View File
@@ -144,6 +144,8 @@ int serverStatusCount;
void hA3Dg_ExportRenderGeom (refexport_t *incoming_re);
#endif
static int isQuitting = qfalse;
extern void SV_BotFrame( int time );
void CL_CheckForResend( void );
void CL_ShowIP_f(void);
@@ -1472,7 +1474,9 @@ void CL_Disconnect( qboolean showMainMenu ) {
}
CL_UpdateGUID( NULL, 0 );
CL_OldGame();
if(!isQuitting)
CL_OldGame();
}
@@ -3630,7 +3634,7 @@ CL_Shutdown
===============
*/
void CL_Shutdown(char *finalmsg, qboolean disconnect)
void CL_Shutdown(char *finalmsg, qboolean disconnect, qboolean quit)
{
static qboolean recursive = qfalse;
@@ -3646,6 +3650,8 @@ void CL_Shutdown(char *finalmsg, qboolean disconnect)
}
recursive = qtrue;
isQuitting = quit;
if(disconnect)
CL_Disconnect(qtrue);
@@ -3675,7 +3681,6 @@ void CL_Shutdown(char *finalmsg, qboolean disconnect)
Cmd_RemoveCommand ("model");
Cmd_RemoveCommand ("video");
Cmd_RemoveCommand ("stopvideo");
Cmd_RemoveCommand ("minimize");
CL_ShutdownInput();
Con_Shutdown();