Ticket #3073: onematerial.patch

File onematerial.patch, 1.1 KB (added by wraitii, 9 years ago)

Incompatible with the "tree trunk fix". Makes all objects in-game use only a diffuse texture, use the wind effect, and be opaque, for testing purposes.

  • source/graphics/ObjectEntry.cpp

     
    127127    CModel* model = new CModel(objectManager.GetSkeletonAnimManager(), m_Simulation);
    128128    delete m_Model;
    129129    m_Model = model;
    130     model->SetMaterial(g_Renderer.GetMaterialManager().LoadMaterial(m_Base->m_Material));
     130    model->SetMaterial(g_Renderer.GetMaterialManager().LoadMaterial(VfsPath("art/materials/trans_wind.xml")));
     131    //  model->SetMaterial(g_Renderer.GetMaterialManager().LoadMaterial(m_Base->m_Material));
    131132    model->GetMaterial().AddStaticUniform("objectColor", CVector4D(m_Color.r, m_Color.g, m_Color.b, m_Color.a));
    132133    model->InitModel(modeldef);
    133134   
     
    137138    }
    138139   
    139140    std::vector<CObjectBase::Samp>::iterator samp;
    140     for (samp = m_Samplers.begin(); samp != m_Samplers.end(); ++samp)
     141    for (samp = m_Samplers.begin(); samp == m_Samplers.begin(); ++samp)
    141142    {
    142143        CTextureProperties textureProps(samp->m_SamplerFile);
    143144        textureProps.SetWrap(GL_CLAMP_TO_EDGE);