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:
parent
bd1b7dc98f
commit
9cddb351cd
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user