Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8433 in orxonox.OLD for branches/bsp_model


Ignore:
Timestamp:
Jun 15, 2006, 12:59:47 AM (18 years ago)
Author:
patrick
Message:

bsp: fixed another bug. no comments…

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/bsp_model/src/lib/graphics/importer/md3/md3_data.cc

    r8432 r8433  
    315315  // create the memomry to save the triangles
    316316  this->meshes[mesh]->triangles = new MD3Triangle[this->meshes[mesh]->header->triangleNum];
    317   fread(this->meshes[mesh]->triangles, 1, sizeof(MD3Triangle), pFile);
     317  fread(this->meshes[mesh]->triangles, 1, sizeof(MD3Triangle) * this->meshes[mesh]->header->triangleNum, pFile);
    318318
    319319  return this->meshes[mesh]->header->triangleNum * sizeof(MD3Triangle);
     
    332332
    333333  MD3Texture* tex = new MD3Texture[this->meshes[mesh]->header->textureNum];
    334   fread(tex, 1, sizeof(MD3Texture), pFile);
     334  fread(tex, 1, sizeof(MD3Texture) * this->meshes[mesh]->header->textureNum, pFile);
    335335
    336336  for( int i = 0; i < this->meshes[mesh]->header->textureNum; i++) {
     
    352352
    353353  this->meshes[mesh]->texVecs = new MD3TexVecs[this->meshes[mesh]->header->vertexNum];
    354   fread(this->meshes[mesh]->texVecs, 1, sizeof(MD3TexVecs), pFile);
     354  fread(this->meshes[mesh]->texVecs, 1, sizeof(MD3TexVecs) * this->meshes[mesh]->header->vertexNum, pFile);
    355355
    356356  return this->meshes[mesh]->header->vertexNum * sizeof(MD3TexVecs);
     
    371371  // read out the compressed data
    372372  MD3VertexCompressed* vc = new MD3VertexCompressed[this->meshes[mesh]->header->meshFrameNum * this->meshes[mesh]->header->vertexNum];
    373   fread(vc, 1, sizeof(MD3VertexCompressed), pFile);
     373  fread(vc, 1, sizeof(MD3VertexCompressed) * this->meshes[mesh]->header->meshFrameNum * this->meshes[mesh]->header->vertexNum, pFile);
    374374
    375375  int index;
Note: See TracChangeset for help on using the changeset viewer.