fix bug causing repeated vertex 0 data to be written out for all frames

could have been avoided if I had actually properly tested converted models!
This commit is contained in:
gered 2012-10-01 18:53:46 -04:00
parent 6150689a38
commit 882d483e45

View file

@ -43,16 +43,16 @@ void WriteChunk(KeyFramesChunk *chunk, FILE *fp)
for (uint32_t j = 0; j < chunk->numVertices; ++j)
{
fwrite(&f->vertices->x, sizeof(float), 1, fp);
fwrite(&f->vertices->y, sizeof(float), 1, fp);
fwrite(&f->vertices->z, sizeof(float), 1, fp);
fwrite(&f->vertices[j].x, sizeof(float), 1, fp);
fwrite(&f->vertices[j].y, sizeof(float), 1, fp);
fwrite(&f->vertices[j].z, sizeof(float), 1, fp);
}
for (uint32_t j = 0; j < chunk->numVertices; ++j)
{
fwrite(&f->normals->x, sizeof(float), 1, fp);
fwrite(&f->normals->y, sizeof(float), 1, fp);
fwrite(&f->normals->z, sizeof(float), 1, fp);
fwrite(&f->normals[j].x, sizeof(float), 1, fp);
fwrite(&f->normals[j].y, sizeof(float), 1, fp);
fwrite(&f->normals[j].z, sizeof(float), 1, fp);
}
}
}