Added animated Wilber by Rudy & Xapantu
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/irrlicht@4237 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
5b58714fff
commit
3a8473e8c6
@ -77,6 +77,7 @@ Other art contributions
|
||||
- Christian Framing (Updated EvilTux kart)
|
||||
- Andy (Needer)
|
||||
- Paul Elms (scifly)
|
||||
- Rudy85 : Character animations
|
||||
|
||||
Robert Howie
|
||||
- Skyline Track (with modifications by conso)
|
||||
|
@ -315,6 +315,7 @@ void IrrDriver::setAllMaterialFlags(scene::IAnimatedMesh *mesh) const
|
||||
if(!t) continue;
|
||||
material_manager->setAllMaterialFlags(t, mb);
|
||||
} // for j<MATERIAL_MAX_TEXTURES
|
||||
material_manager->setAllUntexturedMaterialFlags(mb);
|
||||
} // for i<getMeshBufferCount()
|
||||
} // setAllMaterialFlags
|
||||
|
||||
|
@ -54,11 +54,31 @@ void MaterialManager::setAllMaterialFlags(video::ITexture* t,
|
||||
// Search backward so that temporary (track) textures are found first
|
||||
for(int i = (int)m_materials.size()-1; i>=0; i-- )
|
||||
{
|
||||
if(m_materials[i]->getTexFname()==image)
|
||||
if (m_materials[i]->getTexFname()==image)
|
||||
{
|
||||
m_materials[i]->setMaterialProperties(&(mb->getMaterial()));
|
||||
}
|
||||
} // for i
|
||||
} // setAllMaterialFlags
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
void MaterialManager::setAllUntexturedMaterialFlags(scene::IMeshBuffer *mb) const
|
||||
{
|
||||
for(int i = (int)m_materials.size()-1; i>=0; i-- )
|
||||
{
|
||||
irr::video::SMaterial& material = mb->getMaterial();
|
||||
if (material.getTexture(0) == NULL)
|
||||
{
|
||||
//material.AmbientColor = video::SColor(255, 50, 50, 50);
|
||||
//material.DiffuseColor = video::SColor(255, 150, 150, 150);
|
||||
material.EmissiveColor = video::SColor(255, 0, 0, 0);
|
||||
material.SpecularColor = video::SColor(255, 0, 0, 0);
|
||||
//material.Shininess = 0.0f;
|
||||
material.ColorMaterial = irr::video::ECM_DIFFUSE ;
|
||||
material.MaterialType = irr::video::EMT_SOLID;
|
||||
}
|
||||
} // for i
|
||||
|
||||
}
|
||||
//-----------------------------------------------------------------------------
|
||||
int MaterialManager::addEntity(Material *m)
|
||||
{
|
||||
|
@ -43,6 +43,7 @@ public:
|
||||
void reInit ();
|
||||
void setAllMaterialFlags(video::ITexture* t,
|
||||
scene::IMeshBuffer *mb) const;
|
||||
void setAllUntexturedMaterialFlags(scene::IMeshBuffer *mb) const;
|
||||
int addEntity (Material *m);
|
||||
Material *getMaterial (const std::string& t, bool is_full_path=false,
|
||||
bool make_permanent=false);
|
||||
|
Loading…
Reference in New Issue
Block a user