mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-03-22 02:11:19 +00:00
[gamecode] Set legacy progs def sizes from type
Legacy progs do not have the extended defs data (and usually won't have anything more complicated than a vector), so use the basic type size for the def size. Fixes broken edict prints.
This commit is contained in:
parent
ae231319ea
commit
d5454faeb7
1 changed files with 10 additions and 0 deletions
|
@ -324,6 +324,16 @@ PR_LoadProgsFile (progs_t *pr, QFile *file, int size)
|
|||
def->ofs = xdef->ofs;
|
||||
def->type_encoding = xdef->type;
|
||||
}
|
||||
} else {
|
||||
pr_def_t *def;
|
||||
for (def = pr->pr_globaldefs, i = 0; i < pr->progs->numglobaldefs;
|
||||
i++, def++) {
|
||||
def->size = pr_type_size[def->type];
|
||||
}
|
||||
for (def = pr->pr_fielddefs, i = 0; i < pr->progs->numfielddefs;
|
||||
i++, def++) {
|
||||
def->size = pr_type_size[def->type];
|
||||
}
|
||||
}
|
||||
pr->pr_trace = 0;
|
||||
pr->pr_trace_depth = 0;
|
||||
|
|
Loading…
Reference in a new issue