mirror of
https://github.com/Shpoike/Quakespasm.git
synced 2025-02-09 01:01:07 +00:00
Don't explicitly expose pr_strings to the whole engine, make it static
to pr_edict.c. Assign a static array of zeroes to sv.model_precache[0] and sv.sound_precache[0], instead of pr_strings, in sv_main.c. git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@109 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
parent
e5df1b24be
commit
088fb98279
3 changed files with 4 additions and 5 deletions
|
@ -31,8 +31,7 @@ globalvars_t *pr_global_struct;
|
|||
float *pr_globals; // same as pr_global_struct
|
||||
int pr_edict_size; // in bytes
|
||||
|
||||
char *pr_strings; // no one should access this. not static
|
||||
// only for two stupid sv_main.c uses.
|
||||
static char *pr_strings;
|
||||
static int pr_stringssize;
|
||||
static char **pr_knownstrings;
|
||||
static int pr_maxknownstrings;
|
||||
|
|
|
@ -55,7 +55,6 @@ typedef struct edict_s
|
|||
|
||||
extern dprograms_t *progs;
|
||||
extern dfunction_t *pr_functions;
|
||||
extern char *pr_strings;
|
||||
extern dstatement_t *pr_statements;
|
||||
extern globalvars_t *pr_global_struct;
|
||||
extern float *pr_globals; // same as pr_global_struct
|
||||
|
|
|
@ -1274,6 +1274,7 @@ This is called at the start of each level
|
|||
extern float scr_centertime_off;
|
||||
void SV_SpawnServer (char *server)
|
||||
{
|
||||
static char dummy[4] = { 0, 0, 0, 0 };
|
||||
edict_t *ent;
|
||||
int i;
|
||||
|
||||
|
@ -1365,8 +1366,8 @@ void SV_SpawnServer (char *server)
|
|||
//
|
||||
SV_ClearWorld ();
|
||||
|
||||
sv.sound_precache[0] = pr_strings;
|
||||
sv.model_precache[0] = pr_strings;
|
||||
sv.sound_precache[0] = dummy;
|
||||
sv.model_precache[0] = dummy;
|
||||
sv.model_precache[1] = sv.modelname;
|
||||
for (i=1 ; i<sv.worldmodel->numsubmodels ; i++)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue