fix BGE bug #8869: Added objects are not lit correctly

The current layer information is now stored in KX_GameObject and inherited from the parent object when dynamically added. This information is used during the rendering the select the lamps. As the selected lamps are always coming from active layers, their position and orientation are correct.
This commit is contained in:
Benoit Bolsee
2008-04-30 19:58:44 +00:00
parent 93ba2dd6a1
commit 3a430c33d2
8 changed files with 54 additions and 7 deletions

View File

@@ -91,6 +91,10 @@ int KX_BlenderRenderTools::ProcessLighting(int layer)
{
if (m_clientobject)
{
if (layer == RAS_LIGHT_OBJECT_LAYER)
{
layer = static_cast<KX_GameObject*>(m_clientobject)->GetLayer();
}
if (applyLights(layer))
{
EnableOpenGLLights();