gameinfo: add MIN_EDICTS constant instead of magic number 600, low it to 64
This commit is contained in:
parent
a1db6c6a9b
commit
d6f8112860
3 changed files with 4 additions and 2 deletions
|
@ -881,7 +881,7 @@ void CL_ParseServerData( sizebuf_t *msg )
|
||||||
cl.playernum = MSG_ReadByte( msg );
|
cl.playernum = MSG_ReadByte( msg );
|
||||||
cl.maxclients = MSG_ReadByte( msg );
|
cl.maxclients = MSG_ReadByte( msg );
|
||||||
clgame.maxEntities = MSG_ReadWord( msg );
|
clgame.maxEntities = MSG_ReadWord( msg );
|
||||||
clgame.maxEntities = bound( 30, clgame.maxEntities, MAX_EDICTS );
|
clgame.maxEntities = bound( MIN_EDICTS, clgame.maxEntities, MAX_EDICTS );
|
||||||
clgame.maxModels = MSG_ReadWord( msg );
|
clgame.maxModels = MSG_ReadWord( msg );
|
||||||
Q_strncpy( clgame.mapname, MSG_ReadString( msg ), MAX_STRING );
|
Q_strncpy( clgame.mapname, MSG_ReadString( msg ), MAX_STRING );
|
||||||
Q_strncpy( clgame.maptitle, MSG_ReadString( msg ), MAX_STRING );
|
Q_strncpy( clgame.maptitle, MSG_ReadString( msg ), MAX_STRING );
|
||||||
|
|
|
@ -1588,7 +1588,7 @@ void FS_ParseGenericGameInfo( gameinfo_t *GameInfo, const char *buf, const qbool
|
||||||
else if( !Q_stricmp( token, isGameInfo ? "max_edicts" : "edicts" ))
|
else if( !Q_stricmp( token, isGameInfo ? "max_edicts" : "edicts" ))
|
||||||
{
|
{
|
||||||
pfile = COM_ParseFile( pfile, token );
|
pfile = COM_ParseFile( pfile, token );
|
||||||
GameInfo->max_edicts = bound( 600, Q_atoi( token ), MAX_EDICTS );
|
GameInfo->max_edicts = bound( MIN_EDICTS, Q_atoi( token ), MAX_EDICTS );
|
||||||
}
|
}
|
||||||
// only for gameinfo
|
// only for gameinfo
|
||||||
else if( isGameInfo )
|
else if( isGameInfo )
|
||||||
|
|
|
@ -126,6 +126,8 @@ GNU General Public License for more details.
|
||||||
#define MAX_EDICTS_BYTES ((MAX_EDICTS + 7) / 8)
|
#define MAX_EDICTS_BYTES ((MAX_EDICTS + 7) / 8)
|
||||||
#define LAST_EDICT (MAX_EDICTS - 1)
|
#define LAST_EDICT (MAX_EDICTS - 1)
|
||||||
|
|
||||||
|
#define MIN_EDICTS 64
|
||||||
|
|
||||||
#define MAX_CUSTOM_BITS 10
|
#define MAX_CUSTOM_BITS 10
|
||||||
#define MAX_CUSTOM (1<<MAX_CUSTOM_BITS)// 10 bits == 1024 generic file
|
#define MAX_CUSTOM (1<<MAX_CUSTOM_BITS)// 10 bits == 1024 generic file
|
||||||
#define MAX_USER_MESSAGES 197 // another 58 messages reserved for engine routines
|
#define MAX_USER_MESSAGES 197 // another 58 messages reserved for engine routines
|
||||||
|
|
Loading…
Add table
Reference in a new issue