Reverted r14410 - the proper finding of textures when loading models

is implemented, and has worked properly in the last years. This patch
will unlikely fix the issue Funto had (incorrect texture for one kart),
but might have unwanted side effects which are hard to evaluate so short
before a release.


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@14442 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
hikerstk 2013-11-15 00:40:53 +00:00
parent 4b50173f33
commit 5d7650c418

View File

@ -688,11 +688,11 @@ void IrrDriver::printRenderStats()
scene::IAnimatedMesh *IrrDriver::getAnimatedMesh(const std::string &filename)
{
scene::IAnimatedMesh *m = NULL;
io::IFileSystem* file_system = getDevice()->getFileSystem();
if (StringUtils::getExtension(filename) == "b3dz")
{
// compressed file
io::IFileSystem* file_system = getDevice()->getFileSystem();
if (!file_system->addFileArchive(filename.c_str(),
/*ignoreCase*/false,
/*ignorePath*/true, io::EFAT_ZIP))
@ -707,8 +707,6 @@ scene::IAnimatedMesh *IrrDriver::getAnimatedMesh(const std::string &filename)
io::IFileArchive* zip_archive =
file_system->getFileArchive(file_system->getFileArchiveCount()-1);
io::IReadFile* content = zip_archive->createAndOpenFile(0);
m_scene_manager->getParameters()->setAttribute(irr::scene::B3D_TEXTURE_PATH, file_system->getFileDir(irr::io::path(filename.c_str()) ).c_str() );
m = m_scene_manager->getMesh(content);
content->drop();
@ -716,7 +714,6 @@ scene::IAnimatedMesh *IrrDriver::getAnimatedMesh(const std::string &filename)
}
else
{
m_scene_manager->getParameters()->setAttribute(irr::scene::B3D_TEXTURE_PATH, file_system->getFileDir(irr::io::path(filename.c_str()) ).c_str() );
m = m_scene_manager->getMesh(filename.c_str());
}