fixed field remapping, so plats work properly now.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@1338 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
13cade8fe9
commit
057b64555b
1 changed files with 3 additions and 3 deletions
|
@ -230,7 +230,7 @@ int QC_RegisterFieldVar(progfuncs_t *progfuncs, unsigned int type, char *name, i
|
|||
continue;
|
||||
}
|
||||
if (!progfuncs->fieldadjust && engineofs>=0)
|
||||
if ((unsigned)engineofs != field[i].ofs)
|
||||
if ((unsigned)engineofs/4 != field[i].ofs)
|
||||
Sys_Error("Field %s at wrong offset", name);
|
||||
|
||||
if (field[i].progsofs == -1)
|
||||
|
@ -262,7 +262,7 @@ int QC_RegisterFieldVar(progfuncs_t *progfuncs, unsigned int type, char *name, i
|
|||
n=PRHunkAlloc(progfuncs, namelen);
|
||||
sprintf(n, "%s_x", name);
|
||||
ofs = QC_RegisterFieldVar(progfuncs, ev_float, n, engineofs, progsofs);
|
||||
field[fnum].ofs = ofs;
|
||||
field[fnum].ofs = ofs+progfuncs->fieldadjust;
|
||||
|
||||
n=PRHunkAlloc(progfuncs, namelen);
|
||||
sprintf(n, "%s_y", name);
|
||||
|
@ -278,7 +278,7 @@ int QC_RegisterFieldVar(progfuncs_t *progfuncs, unsigned int type, char *name, i
|
|||
//paranoid checking of the offset.
|
||||
for (i = 0; i < numfields-1; i++)
|
||||
{
|
||||
if (field[i].ofs == ((unsigned)engineofs)*4)
|
||||
if (field[i].ofs == ((unsigned)engineofs)/4)
|
||||
{
|
||||
if (type == ev_float && field[i].type == ev_vector) //check names
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue