===============
*/
extern void PR_Cmd_Reset (void);
-void PR_LoadProgs (void)
+void PR_LoadProgs (const char *progsname)
{
int i;
dstatement_t *st;
ddef_t *infielddefs;
dfunction_t *dfunctions;
+ if (!progsname || !*progsname)
+ Host_Error("PR_LoadProgs: passed empty progsname");
+
// flush the non-C variable lookup cache
for (i=0 ; i<GEFV_CACHESIZE ; i++)
gefvCache[i].field[0] = 0;
Mem_EmptyPool(progs_mempool);
Mem_EmptyPool(edictstring_mempool);
- progs = (dprograms_t *)FS_LoadFile ("progs.dat", progs_mempool, false);
+ progs = (dprograms_t *)FS_LoadFile (progsname, progs_mempool, false);
if (!progs)
- Host_Error ("PR_LoadProgs: couldn't load progs.dat");
+ Host_Error ("PR_LoadProgs: couldn't load %s", progsname);
Con_DPrintf("Programs occupy %iK.\n", fs_filesize/1024);
void PR_Init (void);
void PR_ExecuteProgram (func_t fnum, const char *errormessage);
-void PR_LoadProgs (void);
+void PR_LoadProgs (const char *progsname);
void PR_Profile_f (void);
cvar_t sv_gameplayfix_swiminbmodels = {0, "sv_gameplayfix_swiminbmodels", "1"};
cvar_t sv_gameplayfix_setmodelrealbox = {0, "sv_gameplayfix_setmodelrealbox", "1"};
+cvar_t sv_progs = {0, "sv_progs", "progs.dat" };
+
server_t sv;
server_static_t svs;
Cvar_RegisterVariable (&sv_protocolname);
Cvar_RegisterVariable (&sv_ratelimitlocalplayer);
Cvar_RegisterVariable (&sv_maxrate);
+ Cvar_RegisterVariable (&sv_progs);
SV_Phys_Init();
SV_World_Init();
}
// load progs to get entity field count
- PR_LoadProgs ();
+ PR_LoadProgs ( sv_progs.string );
// allocate server memory
// start out with just enough room for clients and a reasonable estimate of entities
0 darkplaces server: add an extension to check if a file exists outside the data directory, FRIK_FILE can do this but only inside data directory (Error)
0 darkplaces server: add filename/line number reporting to progs stack and opcode printouts (Spike)
0 darkplaces server: add sv_playerphysicsqc cvar to allow engine to ignore SV_PlayerPhysics function, this would also have to change the reported extensions (Gleeb)
-0 darkplaces server: add sv_progs cvar, defaulted to "progs.dat", can be set from console or by menu to choose a mod (Black)
+d darkplaces server: add sv_progs cvar, defaulted to "progs.dat", can be set from console or by menu to choose a mod (Black)
0 darkplaces server: make dedicated server not load images (maybe all fail?)
0 darkplaces server: make fopen have the ability to disable fopen builtin access to read /, read data/, write data/, or disable fopen builtin entirely
0 darkplaces sound: Lordhavoc needs to talk to fuh about snd_macos.c (fuh)