* The ugly M2 <--> MDX problem rears its head again...
This commit is contained in:
parent
8c5f706dc3
commit
21f25f2c85
@ -628,14 +628,11 @@ void SceneWorld::UpdateTerrain(void)
|
|||||||
if(_doodads.find(d->uniqueid) == _doodads.end()) // only add doodads that dont exist yet
|
if(_doodads.find(d->uniqueid) == _doodads.end()) // only add doodads that dont exist yet
|
||||||
{
|
{
|
||||||
std::string filename;
|
std::string filename;
|
||||||
if(instance->GetConf()->useMPQ)
|
|
||||||
{
|
filename= d->model.c_str();//This is a hack and needs fixing at some point.
|
||||||
filename= d->MPQpath.c_str();
|
//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
|
||||||
else
|
|
||||||
{
|
|
||||||
filename= d->model.c_str();
|
|
||||||
}
|
|
||||||
// logdebug("loading Doodad %s",filename.c_str());
|
// logdebug("loading Doodad %s",filename.c_str());
|
||||||
io::IReadFile* modelfile = io::IrrCreateIReadFileBasic(device, filename.c_str());
|
io::IReadFile* modelfile = io::IrrCreateIReadFileBasic(device, filename.c_str());
|
||||||
if (!modelfile)
|
if (!modelfile)
|
||||||
|
|||||||
@ -88,8 +88,12 @@ namespace MemoryDataHolder
|
|||||||
}
|
}
|
||||||
void MakeModelFilename(char* fn, std::string fname)
|
void MakeModelFilename(char* fn, std::string fname)
|
||||||
{
|
{
|
||||||
|
if(fname.find(".mdx")!=std::string::npos)
|
||||||
|
fname.replace(fname.length()-3,3,"m2");
|
||||||
if(loadFromMPQ)
|
if(loadFromMPQ)
|
||||||
|
{
|
||||||
sprintf(fn,"%s",fname.c_str());
|
sprintf(fn,"%s",fname.c_str());
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
NormalizeFilename(_PathToFileName(fname));
|
NormalizeFilename(_PathToFileName(fname));
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user