Skip to content
Permalink
Browse files

[c12916] Fix problem with scaling vmap model. VMap and MMap need to b…

…e rebuilded. Executable is updated too.

More infos -> cmangos/mangos-tbc@6429445

(based on commit [12718] - 0804985)

Signed-off-by: Xfurry <xfurry@scriptdev2.com>
  • Loading branch information...
Shauren authored and xfurry committed Sep 8, 2014
1 parent f6e97fa commit eb9fbb8992e12e7ac3e6aa3368b9fe72dca73810
@@ -156,7 +156,11 @@ ModelInstance::ModelInstance(MPQFile& f, const char* 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);

uint16 fFlags; // dummy var
f.read(&scale, 2);
f.read(&fFlags, 2); // unknown but flag 1 is used for biodome in Outland, currently this value is not used

// scale factor - divide by 1024. blizzard devs must be on crack, why not just use a float?
sc = scale / 1024.0f;

@@ -195,20 +199,4 @@ ModelInstance::ModelInstance(MPQFile& f, const char* ModelInstName, uint32 mapID
uint32 nlen = strlen(ModelInstName);
fwrite(&nlen, sizeof(uint32), 1, pDirfile);
fwrite(ModelInstName, sizeof(char), nlen, pDirfile);

/* int realx1 = (int) ((float) pos.x / 533.333333f);
int realy1 = (int) ((float) pos.z / 533.333333f);
int realx2 = (int) ((float) pos.x / 533.333333f);
int realy2 = (int) ((float) pos.z / 533.333333f);
fprintf(pDirfile,"%s/%s %f,%f,%f_%f,%f,%f %f %d %d %d,%d %d\n",
MapName,
ModelInstName,
(float) pos.x, (float) pos.y, (float) pos.z,
(float) rot.x, (float) rot.y, (float) rot.z,
sc,
nVertices,
realx1, realy1,
realx2, realy2
); */
}
@@ -65,9 +65,9 @@ class ModelInstance
Model* model;

uint32 id;
uint16 scale;
Vec3D pos, rot;
unsigned int d1, scale;
float w, sc;
float sc;

ModelInstance() {}
ModelInstance(MPQFile& f, const char* ModelInstName, uint32 mapID, uint32 tileX, uint32 tileY, FILE* pDirfile);
@@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "12915"
#define REVISION_NR "12916"
#endif // __REVISION_NR_H__

0 comments on commit eb9fbb8

Please sign in to comment.
You can’t perform that action at this time.