* The ugly M2 <--> MDX problem rears its head again...

This commit is contained in:
shlainn 2011-09-11 14:09:46 +02:00
parent 8c5f706dc3
commit 21f25f2c85
2 changed files with 9 additions and 8 deletions

View File

@ -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)

View File

@ -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));