mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-30 08:00:51 +00:00
Use the correct index variable when byteswapping the arrays.
Not the cause of the broken animations :(
This commit is contained in:
parent
7cda91a879
commit
31d89782ef
1 changed files with 4 additions and 4 deletions
|
@ -177,7 +177,7 @@ load_iqm_vertex_arrays (model_t *mod, const iqmheader *hdr, byte *buffer)
|
||||||
bytes += va->size * sizeof (float);
|
bytes += va->size * sizeof (float);
|
||||||
position = (float *) (buffer + va->offset);
|
position = (float *) (buffer + va->offset);
|
||||||
for (j = 0; j < va->size * hdr->num_vertexes; j++)
|
for (j = 0; j < va->size * hdr->num_vertexes; j++)
|
||||||
position[i] = LittleFloat (position[i]);
|
position[j] = LittleFloat (position[j]);
|
||||||
break;
|
break;
|
||||||
case IQM_NORMAL:
|
case IQM_NORMAL:
|
||||||
if (normal)
|
if (normal)
|
||||||
|
@ -188,7 +188,7 @@ load_iqm_vertex_arrays (model_t *mod, const iqmheader *hdr, byte *buffer)
|
||||||
bytes += va->size * sizeof (float);
|
bytes += va->size * sizeof (float);
|
||||||
normal = (float *) (buffer + va->offset);
|
normal = (float *) (buffer + va->offset);
|
||||||
for (j = 0; j < va->size * hdr->num_vertexes; j++)
|
for (j = 0; j < va->size * hdr->num_vertexes; j++)
|
||||||
normal[i] = LittleFloat (normal[i]);
|
normal[j] = LittleFloat (normal[j]);
|
||||||
break;
|
break;
|
||||||
case IQM_TANGENT:
|
case IQM_TANGENT:
|
||||||
if (tangent)
|
if (tangent)
|
||||||
|
@ -199,7 +199,7 @@ load_iqm_vertex_arrays (model_t *mod, const iqmheader *hdr, byte *buffer)
|
||||||
bytes += va->size * sizeof (float);
|
bytes += va->size * sizeof (float);
|
||||||
tangent = (float *) (buffer + va->offset);
|
tangent = (float *) (buffer + va->offset);
|
||||||
for (j = 0; j < va->size * hdr->num_vertexes; j++)
|
for (j = 0; j < va->size * hdr->num_vertexes; j++)
|
||||||
tangent[i] = LittleFloat (tangent[i]);
|
tangent[j] = LittleFloat (tangent[j]);
|
||||||
break;
|
break;
|
||||||
case IQM_TEXCOORD:
|
case IQM_TEXCOORD:
|
||||||
if (texcoord)
|
if (texcoord)
|
||||||
|
@ -210,7 +210,7 @@ load_iqm_vertex_arrays (model_t *mod, const iqmheader *hdr, byte *buffer)
|
||||||
bytes += va->size * sizeof (float);
|
bytes += va->size * sizeof (float);
|
||||||
texcoord = (float *) (buffer + va->offset);
|
texcoord = (float *) (buffer + va->offset);
|
||||||
for (j = 0; j < va->size * hdr->num_vertexes; j++)
|
for (j = 0; j < va->size * hdr->num_vertexes; j++)
|
||||||
texcoord[i] = LittleFloat (texcoord[i]);
|
texcoord[j] = LittleFloat (texcoord[j]);
|
||||||
break;
|
break;
|
||||||
case IQM_BLENDINDEXES:
|
case IQM_BLENDINDEXES:
|
||||||
if (blendindex)
|
if (blendindex)
|
||||||
|
|
Loading…
Reference in a new issue