diff options
Diffstat (limited to 'source/gameengine/Rasterizer/RAS_IPolygonMaterial.cpp')
-rw-r--r-- | source/gameengine/Rasterizer/RAS_IPolygonMaterial.cpp | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/source/gameengine/Rasterizer/RAS_IPolygonMaterial.cpp b/source/gameengine/Rasterizer/RAS_IPolygonMaterial.cpp index 4af1753c2da..ddadd97b567 100644 --- a/source/gameengine/Rasterizer/RAS_IPolygonMaterial.cpp +++ b/source/gameengine/Rasterizer/RAS_IPolygonMaterial.cpp @@ -254,12 +254,18 @@ bool RAS_IPolyMaterial::UsesLighting(RAS_IRasterizer *rasty) const { bool dolights = false; - if (m_flag & RAS_BLENDERMAT) - dolights = (m_flag &RAS_MULTILIGHT)!=0; - else if (rasty->GetDrawingMode() < RAS_IRasterizer::KX_SOLID); - else if (rasty->GetDrawingMode() == RAS_IRasterizer::KX_SHADOW); - else + if (m_flag & RAS_BLENDERMAT) { + dolights = (m_flag & RAS_MULTILIGHT) != 0; + } + else if (rasty->GetDrawingMode() < RAS_IRasterizer::KX_SOLID) { + /* pass */ + } + else if (rasty->GetDrawingMode() == RAS_IRasterizer::KX_SHADOW) { + /* pass */ + } + else { dolights = m_light; + } return dolights; } |