Core/Extractors: Fixed a possible issue with M2 model scaling

This commit is contained in:
Shauren committed 2013-06-27 19:38:03 +02:00
1 parent d967162f39
commit 53e5fc2fbc
2 files changed
+5 -7

No files matched your search

+2 -2
View File
@@ -128,7 +128,6 @@ Vec3D fixCoordSystem2(Vec3D v)
}
ModelInstance::ModelInstance(MPQFile& f, char const* ModelInstName, uint32 mapID, uint32 tileX, uint32 tileY, FILE *pDirfile)
: model(NULL), d1(0), w(0.0f)
{
float ff[3];
f.read(&id, 4);
@@ -136,7 +135,8 @@ ModelInstance::ModelInstance(MPQFile& f, char const* ModelInstName, uint32 mapID
pos = fixCoords(Vec3D(ff[0], ff[1], ff[2]));
f.read(ff, 12);
rot = Vec3D(ff[0], ff[1], ff[2]);
f.read(&scale, 4);
f.read(&scale, 2);
f.read(&flags, 2);
// scale factor - divide by 1024. blizzard devs must be on crack, why not just use a float?
sc = scale / 1024.0f;