Better detection of deprecated textures

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@12320 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
auria 2013-01-01 19:46:53 +00:00
parent baeaac3189
commit 27299e6cc6

View File

@ -320,6 +320,7 @@ Material::Material(const XMLNode *node, int index, bool deprecated)
m_deprecated = deprecated;
node->get("name", &m_texname);
if (m_texname=="")
{
throw std::runtime_error("[Material] No texture name specified "
@ -858,8 +859,7 @@ void Material::setMaterialProperties(video::SMaterial *m, scene::IMeshBuffer* m
// materials.xml, if you want to set flags for all surfaces, see
// 'MaterialManager::setAllMaterialFlags'
if (m_deprecated)
if (m_deprecated || (m->getTexture(0) != NULL && ((core::stringc)m->getTexture(0)->getName()).find("deprecated") != -1))
{
fprintf(stderr, "WARNING: track uses deprecated texture <%s>\n", m_texname.c_str());
}