mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 15:22:04 +00:00
fix classname field finding
This commit is contained in:
parent
63b990cd30
commit
cc43c91c89
1 changed files with 4 additions and 2 deletions
|
@ -858,6 +858,7 @@ ED_LoadFromFile (progs_t * pr, char *data)
|
||||||
int inhibit;
|
int inhibit;
|
||||||
dfunction_t *func;
|
dfunction_t *func;
|
||||||
eval_t *classname;
|
eval_t *classname;
|
||||||
|
ddef_t *def;
|
||||||
|
|
||||||
ent = NULL;
|
ent = NULL;
|
||||||
inhibit = 0;
|
inhibit = 0;
|
||||||
|
@ -888,13 +889,14 @@ ED_LoadFromFile (progs_t * pr, char *data)
|
||||||
//
|
//
|
||||||
// immediately call spawn function
|
// immediately call spawn function
|
||||||
//
|
//
|
||||||
classname = GETEDICTFIELDVALUE (ent, FindFieldOffset (pr, "classname"));
|
def = ED_FindField (pr, "classname");
|
||||||
if (classname) {
|
if (!def) {
|
||||||
Con_Printf ("No classname for:\n");
|
Con_Printf ("No classname for:\n");
|
||||||
ED_Print (pr, ent);
|
ED_Print (pr, ent);
|
||||||
ED_Free (pr, ent);
|
ED_Free (pr, ent);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
classname = (eval_t*)&ent->v[def->ofs];
|
||||||
// look for the spawn function
|
// look for the spawn function
|
||||||
func = ED_FindFunction (pr, PR_GetString (pr, classname->string));
|
func = ED_FindFunction (pr, PR_GetString (pr, classname->string));
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue