mirror of
https://github.com/DrBeef/ioq3quest.git
synced 2024-11-10 14:52:00 +00:00
* 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.
This commit is contained in:
parent
0e0aac2cb6
commit
d5509dcd35
2 changed files with 3 additions and 3 deletions
|
@ -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 );
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue