diff options
author | icculus <icculus@edf5b092-35ff-0310-97b2-ce42778d08ea> | 2009-09-14 19:28:59 +0000 |
---|---|---|
committer | icculus <icculus@edf5b092-35ff-0310-97b2-ce42778d08ea> | 2009-09-14 19:28:59 +0000 |
commit | 9da42b11e03447a6d0b67b054be2e1f92a4dec8f (patch) | |
tree | ac3155c41ce7401b7a2e27aff3c6a910fbaa1016 /code | |
parent | 0f7858ec1270f03cee3a37e84e7273a7ac45ac9f (diff) | |
download | ioquake3-aero-9da42b11e03447a6d0b67b054be2e1f92a4dec8f.tar.gz ioquake3-aero-9da42b11e03447a6d0b67b054be2e1f92a4dec8f.zip |
Minor reworking to check command line cvars before Com_InitZoneMemory().
This lets you set com_zoneMegs from the command line (although still not
from a config file, but oh well).
Fixes Bugzilla #2571.
git-svn-id: svn://svn.icculus.org/quake3/trunk@1590 edf5b092-35ff-0310-97b2-ce42778d08ea
Diffstat (limited to 'code')
-rw-r--r-- | code/qcommon/common.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/code/qcommon/common.c b/code/qcommon/common.c index 75e5f80..f0a341b 100644 --- a/code/qcommon/common.c +++ b/code/qcommon/common.c @@ -1397,9 +1397,11 @@ void Com_InitSmallZoneMemory( void ) { void Com_InitZoneMemory( void ) { cvar_t *cv; - //FIXME: 05/01/06 com_zoneMegs is useless right now as neither q3config.cfg nor - // Com_StartupVariable have been executed by this point. The net result is that - // s_zoneTotal will always be set to the default value. + // Please note: com_zoneMegs can only be set on the command line, and + // not in q3config.cfg or Com_StartupVariable, as they haven't been + // executed by this point. It's a chicken and egg problem. We need the + // memory manager configured to handle those places where you would + // configure the memory manager. // allocate the random block zone cv = Cvar_Get( "com_zoneMegs", DEF_COMZONEMEGS_S, CVAR_LATCH | CVAR_ARCHIVE ); @@ -2550,12 +2552,12 @@ void Com_Init( char *commandLine ) { // Swap_Init (); Cbuf_Init (); - Com_InitZoneMemory(); - Cmd_Init (); - // override anything from the config files with command line args Com_StartupVariable( NULL ); + Com_InitZoneMemory(); + Cmd_Init (); + // get the developer cvar set as early as possible Com_StartupVariable( "developer" ); |