engine: common: hpak: rename hpk_maxsize to hpak_max_size to avoid Valve's defaults
While we're here: * Increase it to 64 MiB. * Make it privileged. * Add hpk_maxsize stub command as a deprecation notice.
This commit is contained in:
parent
8bc76e3d58
commit
1b36785177
1 changed files with 7 additions and 1 deletions
|
@ -27,11 +27,16 @@ typedef struct hash_pack_queue_s
|
||||||
struct hash_pack_queue_s *next;
|
struct hash_pack_queue_s *next;
|
||||||
} hash_pack_queue_t;
|
} hash_pack_queue_t;
|
||||||
|
|
||||||
static CVAR_DEFINE_AUTO( hpk_maxsize, "8", FCVAR_ARCHIVE, "set limit by size for all HPK-files ( 0 - unlimited )" );
|
static CVAR_DEFINE( hpk_maxsize, "hpk_max_size", "64", FCVAR_ARCHIVE|FCVAR_PRIVILEGED, "set limit by size for all HPK-files in megabytes ( 0 - unlimited )" );
|
||||||
static hash_pack_queue_t *gp_hpak_queue = NULL;
|
static hash_pack_queue_t *gp_hpak_queue = NULL;
|
||||||
static hpak_header_t hash_pack_header;
|
static hpak_header_t hash_pack_header;
|
||||||
static hpak_info_t hash_pack_info;
|
static hpak_info_t hash_pack_info;
|
||||||
|
|
||||||
|
static void HPAK_MaxSize_f( void )
|
||||||
|
{
|
||||||
|
Con_Printf( S_ERROR "hpk_maxsize is deprecated, use hpk_max_size\n" );
|
||||||
|
}
|
||||||
|
|
||||||
static const char *HPAK_TypeFromIndex( int type )
|
static const char *HPAK_TypeFromIndex( int type )
|
||||||
{
|
{
|
||||||
switch( type )
|
switch( type )
|
||||||
|
@ -1099,6 +1104,7 @@ void HPAK_Init( void )
|
||||||
Cmd_AddRestrictedCommand( "hpkremove", HPAK_Remove_f, "remove specified file from HPK-file" );
|
Cmd_AddRestrictedCommand( "hpkremove", HPAK_Remove_f, "remove specified file from HPK-file" );
|
||||||
Cmd_AddRestrictedCommand( "hpkval", HPAK_Validate_f, "validate specified HPK-file" );
|
Cmd_AddRestrictedCommand( "hpkval", HPAK_Validate_f, "validate specified HPK-file" );
|
||||||
Cmd_AddRestrictedCommand( "hpkextract", HPAK_Extract_f, "extract all lumps from specified HPK-file" );
|
Cmd_AddRestrictedCommand( "hpkextract", HPAK_Extract_f, "extract all lumps from specified HPK-file" );
|
||||||
|
Cmd_AddRestrictedCommand( "hpk_maxsize", HPAK_MaxSize_f, "deprecation notice for hpk_maxsize" );
|
||||||
Cvar_RegisterVariable( &hpk_maxsize );
|
Cvar_RegisterVariable( &hpk_maxsize );
|
||||||
|
|
||||||
gp_hpak_queue = NULL;
|
gp_hpak_queue = NULL;
|
||||||
|
|
Loading…
Add table
Reference in a new issue