From 21f25f2c85fac8c9a767bfdc5cf7c0c5874fe8dc Mon Sep 17 00:00:00 2001 From: shlainn Date: Sun, 11 Sep 2011 14:09:46 +0200 Subject: [PATCH] * The ugly M2 <--> MDX problem rears its head again... --- src/Client/GUI/SceneWorld.cpp | 13 +++++-------- src/Client/MemoryDataHolder.cpp | 4 ++++ 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/Client/GUI/SceneWorld.cpp b/src/Client/GUI/SceneWorld.cpp index c54b232..857864a 100644 --- a/src/Client/GUI/SceneWorld.cpp +++ b/src/Client/GUI/SceneWorld.cpp @@ -628,14 +628,11 @@ void SceneWorld::UpdateTerrain(void) if(_doodads.find(d->uniqueid) == _doodads.end()) // only add doodads that dont exist yet { std::string filename; - if(instance->GetConf()->useMPQ) - { - filename= d->MPQpath.c_str(); - } - else - { - filename= d->model.c_str(); - } + + filename= d->model.c_str();//This is a hack and needs fixing at some point. + //Actually the point at which this will be fixed is when all art assets are loaded together + //because there is no point in loading them separately + // logdebug("loading Doodad %s",filename.c_str()); io::IReadFile* modelfile = io::IrrCreateIReadFileBasic(device, filename.c_str()); if (!modelfile) diff --git a/src/Client/MemoryDataHolder.cpp b/src/Client/MemoryDataHolder.cpp index 3d73c5e..fbc04a0 100644 --- a/src/Client/MemoryDataHolder.cpp +++ b/src/Client/MemoryDataHolder.cpp @@ -88,8 +88,12 @@ namespace MemoryDataHolder } void MakeModelFilename(char* fn, std::string fname) { + if(fname.find(".mdx")!=std::string::npos) + fname.replace(fname.length()-3,3,"m2"); if(loadFromMPQ) + { sprintf(fn,"%s",fname.c_str()); + } else { NormalizeFilename(_PathToFileName(fname));