diff options
author | Piotr Dziwinski <piotrdz@gmail.com> | 2012-09-09 23:34:52 +0200 |
---|---|---|
committer | Piotr Dziwinski <piotrdz@gmail.com> | 2012-09-09 23:34:52 +0200 |
commit | 901f10b2bac18a2063cd21798f22b3917e8519b5 (patch) | |
tree | f9f178eb1a47dc8f549d8b073811fab3ae9cfdc7 /src/graphics/engine | |
parent | b3d5491af4f953e8d63800897c40d602de9e9305 (diff) | |
download | colobot-901f10b2bac18a2063cd21798f22b3917e8519b5.tar.gz colobot-901f10b2bac18a2063cd21798f22b3917e8519b5.tar.bz2 colobot-901f10b2bac18a2063cd21798f22b3917e8519b5.zip |
Fixed old model format bugs
Diffstat (limited to 'src/graphics/engine')
-rw-r--r-- | src/graphics/engine/modelfile.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/graphics/engine/modelfile.cpp b/src/graphics/engine/modelfile.cpp index 2049749..f377c88 100644 --- a/src/graphics/engine/modelfile.cpp +++ b/src/graphics/engine/modelfile.cpp @@ -484,6 +484,8 @@ bool Gfx::CModelFile::ReadModel(std::istream& stream) t.used = IOUtils::ReadBinary<1, char>(stream); t.selected = IOUtils::ReadBinary<1, char>(stream); + /* padding */ IOUtils::ReadBinary<2, unsigned int>(stream); + ReadBinaryVertex(stream, t.p1); ReadBinaryVertex(stream, t.p2); ReadBinaryVertex(stream, t.p3); @@ -520,6 +522,8 @@ bool Gfx::CModelFile::ReadModel(std::istream& stream) t.used = IOUtils::ReadBinary<1, char>(stream); t.selected = IOUtils::ReadBinary<1, char>(stream); + /* padding */ IOUtils::ReadBinary<2, unsigned int>(stream); + ReadBinaryVertex(stream, t.p1); ReadBinaryVertex(stream, t.p2); ReadBinaryVertex(stream, t.p3); @@ -848,7 +852,7 @@ bool Gfx::CModelFile::ReadTextModel(std::istream& stream) if (!triOk || stream.fail()) { - GetLogger()->Error("Error reading model file header\n"); + GetLogger()->Error("Error reading model data\n"); return false; } |