Skip to content

Commit

Permalink
cmod: Fix q3e issue with first map restart after server startup
Browse files Browse the repository at this point in the history
  • Loading branch information
Chomenor committed Sep 9, 2024
1 parent ffd08b8 commit cbd1545
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions code/eliteforce/stef_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,10 @@
// the server.
#define STEF_WINDOWS_CONSOLE_CRASH_FIX

// [BUGFIX] Workaround for Q3e issue causing issues with the first map restart
// or warmup end after server is launched.
#define STEF_MAXCLIENTS_FIRST_RESTART_FIX

/* ******************************************************************************** */
// Common Dependencies
/* ******************************************************************************** */
Expand Down
5 changes: 5 additions & 0 deletions code/server/sv_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -506,6 +506,11 @@ void SV_SpawnServer( const char *mapname, qboolean killBots ) {

// init client structures and svs.numSnapshotEntities
if ( !Cvar_VariableIntegerValue( "sv_running" ) ) {
#ifdef STEF_MAXCLIENTS_FIRST_RESTART_FIX
// unlatch and clear modified flag
sv_maxclients = Cvar_Get( "sv_maxclients", "8", 0 );
sv_maxclients->modified = qfalse;
#endif
SV_Startup();
} else {
// check for maxclients change
Expand Down

0 comments on commit cbd1545

Please sign in to comment.