Bugfix: paths were looked up using the file manager

even if is_full_path was true (and where then not found).


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@6843 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
hikerstk 2010-12-01 05:57:04 +00:00
parent bd1b7dc98f
commit 9cddb351cd

View File

@ -153,8 +153,10 @@ void Material::init(unsigned int index)
//-----------------------------------------------------------------------------
void Material::install(bool is_full_path)
{
// Avoid irrlicht warning about not being able to load texture.
m_texture = irr_driver->getTexture(file_manager->getTextureFile(m_texname));
const std::string &full_path = is_full_path
? m_texname
: file_manager->getTextureFile(m_texname);
m_texture = irr_driver->getTexture(full_path);
// now set the name to the basename, so that all tests work as expected
m_texname = StringUtils::getBasename(m_texname);