mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-26 22:31:05 +00:00
more nq fixes, not there yet
This commit is contained in:
parent
baa5ce01a1
commit
8e52f7dc39
4 changed files with 5 additions and 2 deletions
|
@ -183,6 +183,7 @@ struct progs_s {
|
|||
dprograms_t *progs;
|
||||
dfunction_t *pr_functions;
|
||||
char *pr_strings;
|
||||
int pr_stringsize;
|
||||
ddef_t *pr_globaldefs;
|
||||
ddef_t *pr_fielddefs;
|
||||
dstatement_t *pr_statements;
|
||||
|
|
|
@ -972,6 +972,7 @@ PR_LoadProgs (progs_t * pr, char *progsname)
|
|||
pr->pr_functions =
|
||||
(dfunction_t *) ((byte *) pr->progs + pr->progs->ofs_functions);
|
||||
pr->pr_strings = (char *) pr->progs + pr->progs->ofs_strings;
|
||||
pr->pr_stringsize = LittleLong (pr->progs->numstrings);
|
||||
pr->pr_globaldefs =
|
||||
(ddef_t *) ((byte *) pr->progs + pr->progs->ofs_globaldefs);
|
||||
pr->pr_fielddefs =
|
||||
|
|
|
@ -974,9 +974,9 @@ PR_GetString (progs_t * pr, int num)
|
|||
int
|
||||
PR_SetString (progs_t * pr, char *s)
|
||||
{
|
||||
int i;
|
||||
int i = s - pr->pr_strings;
|
||||
|
||||
if (s - pr->pr_strings < 0) {
|
||||
if (i < 0 || i > pr->pr_stringsize) {
|
||||
for (i = 0; i <= pr->num_prstr; i++)
|
||||
if (pr->pr_strtbl[i] == s)
|
||||
break;
|
||||
|
|
|
@ -946,6 +946,7 @@ Host_Init (quakeparms_t *parms)
|
|||
Key_Init ();
|
||||
Con_Init ();
|
||||
M_Init ();
|
||||
PR_Init_Cvars ();
|
||||
PR_Init ();
|
||||
SV_Progs_Init_Cvars ();
|
||||
SV_Progs_Init ();
|
||||
|
|
Loading…
Reference in a new issue