[quake3-commits] r2115 - in trunk/code: client null qcommon renderer sys
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Mon Aug 1 06:16:41 EDT 2011
Author: thilo
Date: 2011-08-01 06:16:40 -0400 (Mon, 01 Aug 2011)
New Revision: 2115
Modified:
trunk/code/client/cl_main.c
trunk/code/null/null_client.c
trunk/code/qcommon/common.c
trunk/code/qcommon/qcommon.h
trunk/code/renderer/tr_init.c
trunk/code/sys/sys_main.c
Log:
- 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.
Modified: trunk/code/client/cl_main.c
===================================================================
--- trunk/code/client/cl_main.c 2011-08-01 09:33:48 UTC (rev 2114)
+++ trunk/code/client/cl_main.c 2011-08-01 10:16:40 UTC (rev 2115)
@@ -144,6 +144,8 @@
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 @@
}
CL_UpdateGUID( NULL, 0 );
- CL_OldGame();
+
+ if(!isQuitting)
+ CL_OldGame();
}
@@ -3630,7 +3634,7 @@
===============
*/
-void CL_Shutdown(char *finalmsg, qboolean disconnect)
+void CL_Shutdown(char *finalmsg, qboolean disconnect, qboolean quit)
{
static qboolean recursive = qfalse;
@@ -3646,6 +3650,8 @@
}
recursive = qtrue;
+ isQuitting = quit;
+
if(disconnect)
CL_Disconnect(qtrue);
@@ -3675,7 +3681,6 @@
Cmd_RemoveCommand ("model");
Cmd_RemoveCommand ("video");
Cmd_RemoveCommand ("stopvideo");
- Cmd_RemoveCommand ("minimize");
CL_ShutdownInput();
Con_Shutdown();
Modified: trunk/code/null/null_client.c
===================================================================
--- trunk/code/null/null_client.c 2011-08-01 09:33:48 UTC (rev 2114)
+++ trunk/code/null/null_client.c 2011-08-01 10:16:40 UTC (rev 2115)
@@ -25,7 +25,7 @@
cvar_t *cl_shownet;
-void CL_Shutdown(char *finalmsg, qboolean disconnect)
+void CL_Shutdown(char *finalmsg, qboolean disconnect, qboolean quit)
{
}
Modified: trunk/code/qcommon/common.c
===================================================================
--- trunk/code/qcommon/common.c 2011-08-01 09:33:48 UTC (rev 2114)
+++ trunk/code/qcommon/common.c 2011-08-01 10:16:40 UTC (rev 2115)
@@ -333,8 +333,8 @@
longjmp (abortframe, -1);
} else {
VM_Forced_Unload_Start();
- CL_Shutdown (va("Client fatal crashed: %s", com_errorMessage), qtrue);
- SV_Shutdown (va("Server fatal crashed: %s", com_errorMessage));
+ CL_Shutdown(va("Client fatal crashed: %s", com_errorMessage), qtrue, qtrue);
+ SV_Shutdown(va("Server fatal crashed: %s", com_errorMessage));
VM_Forced_Unload_Done();
}
@@ -361,8 +361,8 @@
// Sys_Quit will kill this process anyways, so
// a corrupt call stack makes no difference
VM_Forced_Unload_Start();
- SV_Shutdown (p[0] ? p : "Server quit");
- CL_Shutdown (p[0] ? p : "Client quit", qtrue);
+ SV_Shutdown(p[0] ? p : "Server quit");
+ CL_Shutdown(p[0] ? p : "Client quit", qtrue, qtrue);
VM_Forced_Unload_Done();
Com_Shutdown ();
FS_Shutdown(qtrue);
@@ -2411,7 +2411,7 @@
if(disconnect)
CL_Disconnect(qfalse);
- CL_Shutdown("Game directory changed", disconnect);
+ CL_Shutdown("Game directory changed", disconnect, qfalse);
}
FS_Restart(checksumFeed);
Modified: trunk/code/qcommon/qcommon.h
===================================================================
--- trunk/code/qcommon/qcommon.h 2011-08-01 09:33:48 UTC (rev 2114)
+++ trunk/code/qcommon/qcommon.h 2011-08-01 10:16:40 UTC (rev 2115)
@@ -974,7 +974,7 @@
void CL_Init( void );
void CL_Disconnect( qboolean showMainMenu );
-void CL_Shutdown(char *finalmsg, qboolean disconnect);
+void CL_Shutdown(char *finalmsg, qboolean disconnect, qboolean quit);
void CL_Frame( int msec );
qboolean CL_GameCommand( void );
void CL_KeyEvent (int key, qboolean down, unsigned time);
Modified: trunk/code/renderer/tr_init.c
===================================================================
--- trunk/code/renderer/tr_init.c 2011-08-01 09:33:48 UTC (rev 2114)
+++ trunk/code/renderer/tr_init.c 2011-08-01 10:16:40 UTC (rev 2115)
@@ -1250,6 +1250,7 @@
ri.Cmd_RemoveCommand ("shaderlist");
ri.Cmd_RemoveCommand ("skinlist");
ri.Cmd_RemoveCommand ("gfxinfo");
+ ri.Cmd_RemoveCommand("minimize");
ri.Cmd_RemoveCommand( "modelist" );
ri.Cmd_RemoveCommand( "shaderstate" );
Modified: trunk/code/sys/sys_main.c
===================================================================
--- trunk/code/sys/sys_main.c 2011-08-01 09:33:48 UTC (rev 2114)
+++ trunk/code/sys/sys_main.c 2011-08-01 10:16:40 UTC (rev 2115)
@@ -550,7 +550,7 @@
{
signalcaught = qtrue;
#ifndef DEDICATED
- CL_Shutdown(va("Received signal %d", signal), qtrue);
+ CL_Shutdown(va("Received signal %d", signal), qtrue, qtrue);
#endif
SV_Shutdown(va("Received signal %d", signal) );
}
More information about the quake3-commits
mailing list