diff options
author | tma <tma@edf5b092-35ff-0310-97b2-ce42778d08ea> | 2006-02-23 23:10:54 +0000 |
---|---|---|
committer | tma <tma@edf5b092-35ff-0310-97b2-ce42778d08ea> | 2006-02-23 23:10:54 +0000 |
commit | 3ab88f705ea5fad914cb93c3b2c5be2eb9f18175 (patch) | |
tree | 4e4b5f0065a2d7bb86d47085e5844b281fadde9e /code/server | |
parent | ce0379028218a1462fa1c92245675071d43a2e8f (diff) | |
download | ioquake3-aero-3ab88f705ea5fad914cb93c3b2c5be2eb9f18175.tar.gz ioquake3-aero-3ab88f705ea5fad914cb93c3b2c5be2eb9f18175.zip |
* Fix to a bug where servers with long uptimes (~27 days) would consume 100%
CPU if the running game did not set the nextmap cvar. This patch instead uses
the mapname server cvar, which is guaranteed to be defined.
git-svn-id: svn://svn.icculus.org/quake3/trunk@584 edf5b092-35ff-0310-97b2-ce42778d08ea
Diffstat (limited to 'code/server')
-rw-r--r-- | code/server/sv_init.c | 2 | ||||
-rw-r--r-- | code/server/sv_main.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/code/server/sv_init.c b/code/server/sv_init.c index 4ce424e..02bd910 100644 --- a/code/server/sv_init.c +++ b/code/server/sv_init.c @@ -671,7 +671,7 @@ void SV_Shutdown( char *finalmsg ) { return; } - Com_Printf( "----- Server Shutdown -----\n" ); + Com_Printf( "----- Server Shutdown (%s) -----\n", finalmsg ); if ( svs.clients && !com_errorEntered ) { SV_FinalMessage( finalmsg ); diff --git a/code/server/sv_main.c b/code/server/sv_main.c index 99a3b81..e0d6f01 100644 --- a/code/server/sv_main.c +++ b/code/server/sv_main.c @@ -808,13 +808,13 @@ void SV_Frame( int msec ) { // 2giga-milliseconds = 23 days, so it won't be too often if ( svs.time > 0x70000000 ) { SV_Shutdown( "Restarting server due to time wrapping" ); - Cbuf_AddText( "vstr nextmap\n" ); + Cbuf_AddText( va( "map %s\n", Cvar_VariableString( "mapname" ) ) ); return; } // this can happen considerably earlier when lots of clients play and the map doesn't change if ( svs.nextSnapshotEntities >= 0x7FFFFFFE - svs.numSnapshotEntities ) { SV_Shutdown( "Restarting server due to numSnapshotEntities wrapping" ); - Cbuf_AddText( "vstr nextmap\n" ); + Cbuf_AddText( va( "map %s\n", Cvar_VariableString( "mapname" ) ) ); return; } |