GRIM: Disable lighting for faces that have _light == 0. Fixes #579

This commit is contained in:
Joni Vähämäki 2012-04-08 17:53:03 +03:00
parent b96194c075
commit db74fcf1b1

View File

@ -383,8 +383,14 @@ void MeshFace::changeMaterial(Material *material) {
}
void MeshFace::draw(float *vertices, float *vertNormals, float *textureVerts) const {
if (_light == 0 && !g_driver->isShadowModeActive())
g_driver->disableLights();
_material->select();
g_driver->drawModelFace(this, vertices, vertNormals, textureVerts);
if (_light == 0 && !g_driver->isShadowModeActive())
g_driver->enableLights();
}
/**