summaryrefslogtreecommitdiff
path: root/source/common.c
diff options
context:
space:
mode:
authorAndrey Nazarov <skuller@skuller.net>2008-05-18 14:37:21 +0000
committerAndrey Nazarov <skuller@skuller.net>2008-05-18 14:37:21 +0000
commitcb43ed08c3cf6410fe4ce22dac3d07952db92893 (patch)
tree0b2b2790941743db47913cdf06b819c36b89e161 /source/common.c
parent179f701f7aec100ac1228fc02778fc4af47b75f0 (diff)
Accept `all' as special argument to `delstuffcmd' command.
Cleaned up Cvar_Get and fixed semantic bug. Accept `background keyword in menu scripts. Renamed `gl_fastsky' to `gl_drawsky'. If at least one of the sky env maps fails lo load, disable entire sky drawing. Reworked loading screen. Fixed Com_Quit argument string handling. Catch more signals on *nix. Updated server docs.
Diffstat (limited to 'source/common.c')
-rw-r--r--source/common.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/source/common.c b/source/common.c
index d91dfda..08a9dd0 100644
--- a/source/common.c
+++ b/source/common.c
@@ -442,12 +442,12 @@ Both client and server can use this, and it will
do the apropriate things.
=============
*/
-void Com_Quit( void ) {
- if( Cmd_Argc() > 1 ) {
+void Com_Quit( const char *reason ) {
+ if( reason && *reason ) {
char buffer[MAX_STRING_TOKENS];
Com_sprintf( buffer, sizeof( buffer ),
- "Server quit: %s\n", Cmd_Args() );
+ "Server quit: %s\n", reason );
SV_Shutdown( buffer, KILL_DROP );
} else {
SV_Shutdown( "Server quit\n", KILL_DROP );
@@ -458,6 +458,10 @@ void Com_Quit( void ) {
Sys_Quit();
}
+static void Com_Quit_f( void ) {
+ Com_Quit( Cmd_Args() );
+}
+
/*
==============================================================================
@@ -1365,7 +1369,7 @@ void Qcommon_Init( int argc, char **argv ) {
Cmd_AddCommand( "lasterror", Com_LastError_f );
- Cmd_AddCommand( "quit", Com_Quit );
+ Cmd_AddCommand( "quit", Com_Quit_f );
srand( Sys_Milliseconds() );