mirror of
https://github.com/openmoh/openmohaa.git
synced 2025-04-28 13:47:58 +03:00
Only change the maxclients when the map is different
It fixes an issue where on restart, only the number of snapshot entities was changed without the memory being reallocated for it
This commit is contained in:
parent
6d69a8033f
commit
6a107419e3
1 changed files with 6 additions and 1 deletions
|
@ -613,7 +613,11 @@ void SV_SpawnServer( const char *server, qboolean loadgame, qboolean restart, qb
|
|||
differentmap = qfalse;
|
||||
}
|
||||
|
||||
if( sv_maxclients->modified ) {
|
||||
if( sv_maxclients->modified
|
||||
&& differentmap // Fixed in OPM
|
||||
// OG doesn't check for different map when changing the max clients
|
||||
// which means the snapshot entities memory isn't reallocated
|
||||
) {
|
||||
SV_ChangeMaxClients();
|
||||
}
|
||||
}
|
||||
|
@ -623,6 +627,7 @@ void SV_SpawnServer( const char *server, qboolean loadgame, qboolean restart, qb
|
|||
SV_Startup();
|
||||
}
|
||||
|
||||
// Added in 2.0
|
||||
SV_InitRadar();
|
||||
|
||||
sv.restarting = ( keep_scripts || !differentmap );
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue