reverted black's changes. That just wasn't the place to put it. You stopped it working on standard mods where all files are in one directory.

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@1258 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2005-08-27 05:47:08 +00:00
parent d98ae49588
commit 22fe0fca45

View file

@ -7861,6 +7861,12 @@ void QCC_PR_ParseDefs (char *classname)
for (i = 0; i < d->type->size; i++) for (i = 0; i < d->type->size; i++)
G_INT(def->ofs) = G_INT(d->ofs); G_INT(def->ofs) = G_INT(d->ofs);
QCC_PR_Lex(); QCC_PR_Lex();
if (type->type == ev_function)
{
def->initialized = 1;
def->constant = !isvar;
}
continue; continue;
} }
@ -8354,6 +8360,12 @@ void QCC_PR_ParseDefs (char *classname)
} }
else else
{ {
if (type->type == ev_function && isvar)
{
isconstant = !isvar;
def->initialized = 1;
}
if (isconstant && type->type == ev_field) if (isconstant && type->type == ev_field)
def->constant = 2; //special flag on fields, 2, makes the pointer obtained from them also constant. def->constant = 2; //special flag on fields, 2, makes the pointer obtained from them also constant.
else else
@ -8447,16 +8459,7 @@ pbool QCC_Include(char *filename)
opr_file_p = pr_file_p; opr_file_p = pr_file_p;
oldcurrentchunk = currentchunk; oldcurrentchunk = currentchunk;
if (*filename == '/') strcpy(fname, filename);
strcpy(fname, filename+1);
else
{
strcpy(fname, qccmsourcedir);
strcpy(fname, strings + s_file );
StripFilename( fname );
strcat( fname, "/" );
strcat(fname, filename);
}
QCC_LoadFile(fname, (void*)&newfile); QCC_LoadFile(fname, (void*)&newfile);
currentchunk = NULL; currentchunk = NULL;
pr_file_p = newfile; pr_file_p = newfile;