sv_progs_zone controls the size of the zone for the progs. defaults to

256kb (64k `globals').
This commit is contained in:
Bill Currie 2002-05-31 15:27:56 +00:00
parent c25051e60e
commit cf9e1de5a6
2 changed files with 10 additions and 2 deletions

View file

@ -52,6 +52,7 @@ sv_funcs_t sv_funcs;
sv_fields_t sv_fields;
cvar_t *sv_progs;
cvar_t *sv_progs_zone;
cvar_t *pr_checkextensions;
cvar_t *nomonsters;
@ -136,7 +137,8 @@ SV_LoadProgs (void)
ddef_t *def;
dfunction_t *f;
PR_LoadProgs (&sv_pr_state, sv_progs->string, sv.max_edicts, 0);
PR_LoadProgs (&sv_pr_state, sv_progs->string, sv.max_edicts,
sv_progs_zone->int_val * 1024);
if (!sv_pr_state.progs)
Host_Error ("SV_LoadProgs: couldn't load %s", sv_progs->string);
// progs engine needs these globals anyway
@ -349,6 +351,8 @@ SV_Progs_Init_Cvars (void)
sv_progs = Cvar_Get ("sv_progs", "progs.dat", CVAR_ROM, NULL,
"Allows selectable game progs if you have several "
"of them in the gamedir");
sv_progs_zone = Cvar_Get ("sv_progs_zone", "256", CVAR_NONE, NULL,
"size of the zone for progs in kb");
pr_checkextensions = Cvar_Get ("pr_checkextensions", "1", CVAR_ROM, NULL,
"indicate the presence of the "
"checkextentions qc function");

View file

@ -54,6 +54,7 @@ sv_fields_t sv_fields;
progs_t sv_pr_state;
cvar_t *r_skyname;
cvar_t *sv_progs;
cvar_t *sv_progs_zone;
cvar_t *pr_checkextensions;
cvar_t *sv_old_entity_free;
cvar_t *sv_hide_version_info;
@ -177,7 +178,8 @@ SV_LoadProgs (void)
ddef_t *def;
dfunction_t *f;
PR_LoadProgs (&sv_pr_state, sv_progs->string, MAX_EDICTS, 0);
PR_LoadProgs (&sv_pr_state, sv_progs->string, MAX_EDICTS,
sv_progs_zone->int_val * 1024);
if (!sv_pr_state.progs)
Sys_Error ("SV_LoadProgs: couldn't load %s", sv_progs->string);
// progs engine needs these globals anyway
@ -386,6 +388,8 @@ SV_Progs_Init_Cvars (void)
sv_progs = Cvar_Get ("sv_progs", "qwprogs.dat", CVAR_NONE, NULL,
"Allows selectable game progs if you have several "
"of them in the gamedir");
sv_progs_zone = Cvar_Get ("sv_progs_zone", "256", CVAR_NONE, NULL,
"size of the zone for progs in kb");
pr_checkextensions = Cvar_Get ("pr_checkextensions", "1", CVAR_ROM, NULL,
"indicate the presence of the "
"checkextentions qc function");