* fix MMDX and MCSE (still needs check) chunks in ADT files

* apply rotation on WMOs
This commit is contained in:
bluma4862 2009-07-20 08:42:15 +00:00
parent d15eaffa73
commit ec5a2574b1
4 changed files with 12 additions and 9 deletions

View File

@ -74,8 +74,8 @@ charname=Pseuwow
// Client emulation configuration // Client emulation configuration
ClientVersion=3.0.8 ClientVersion=3.1.3
ClientBuild=9506 ClientBuild=9947
ClientLanguage=enUS ClientLanguage=enUS
// or change to enGB, deDE, ... // or change to enGB, deDE, ...

View File

@ -689,7 +689,7 @@ void SceneWorld::UpdateTerrain(void)
// here: // here:
// doodad->setRotation(core::vector3df(-d->ox,0,-d->oz)); // rotated axes looks good // doodad->setRotation(core::vector3df(-d->ox,0,-d->oz)); // rotated axes looks good
// doodad->setRotation(core::vector3df(0,-d->oy,0)); // same here // doodad->setRotation(core::vector3df(0,-d->oy,0)); // same here
//wmo_node->setRotation(core::vector3df(-wmo->ox,-wmo->oy,-wmo->oz)); // very ugly with some rotations, |ang|>360? wmo_node->setRotation(core::vector3df(-wmo->oz,-wmo->oy,-wmo->ox)); // very ugly with some rotations, |ang|>360?
//wmo_node->setScale(core::vector3df(5,5,5)); //wmo_node->setScale(core::vector3df(5,5,5));

View File

@ -68,9 +68,9 @@ struct MODF_chunk
float x; float x;
float y; float y;
float z; float z;
float ox;
float oy; float oy;
float oz; float oz;
float ox;
// unk floats (orientation?) // unk floats (orientation?)
float ou11; float ou11;
float ou12; float ou12;
@ -157,13 +157,15 @@ struct MCLY_chunk
struct MCSE_chunk struct MCSE_chunk
{ {
uint32 soundPointID; uint32 soundPointID;
uint32 soundNameID;
float x; float x;
float y; float y;
float z; float z;
// TODO: Find real structure, fields left for references in code
uint32 soundNameID;
float minDistance; float minDistance;
float maxDistance; float maxDistance;
float cutoffDistance; /*float cutoffDistance;
uint16 startTime; uint16 startTime;
uint16 endTime; uint16 endTime;
uint16 groupSilenceMin; uint16 groupSilenceMin;
@ -173,7 +175,7 @@ struct MCSE_chunk
uint16 loopCountMin; uint16 loopCountMin;
uint16 loopCountMax; uint16 loopCountMax;
uint16 interSoundGapMin; uint16 interSoundGapMin;
uint16 interSoundGapMax; uint16 interSoundGapMax;*/
}; };
struct LiquidVertex struct LiquidVertex

View File

@ -91,7 +91,8 @@ void MapTile::ImportFromADT(ADTFile *adt)
d.uniqueid = mddf.uniqueid; d.uniqueid = mddf.uniqueid;
d.model = std::string("./data/model/") + NormalizeFilename(_PathToFileName(adt->_models[mddf.id])); d.model = std::string("./data/model/") + NormalizeFilename(_PathToFileName(adt->_models[mddf.id]));
// this .mdx -> .m2 transformation is annoying >.< - replace "mdx" and end of string with "m2" // this .mdx -> .m2 transformation is annoying >.< - replace "mdx" and end of string with "m2"
d.model = d.model.substr(0, d.model.length() - 3) + "m2"; // d.model = d.model.substr(0, d.model.length() - 3) + "m2";
// 3.1.3 - no more .mdx in ADT
d.scale = mddf.scale / 1024.0f; d.scale = mddf.scale / 1024.0f;
if(d.scale < 0.00001f) if(d.scale < 0.00001f)
d.scale = 1; d.scale = 1;