diff options
author | Benoit Bolsee <benoit.bolsee@online.be> | 2008-04-30 23:58:44 +0400 |
---|---|---|
committer | Benoit Bolsee <benoit.bolsee@online.be> | 2008-04-30 23:58:44 +0400 |
commit | 3a430c33d22d659ab3d73709f0dbc60a029e0893 (patch) | |
tree | d7bb536d8731b6668413ed9d55affae6cfe9fc8d /source/gameengine/GamePlayer/common/GPC_RenderTools.cpp | |
parent | 93ba2dd6a1b5a841a49469e12a3671957e6a3500 (diff) |
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.
Diffstat (limited to 'source/gameengine/GamePlayer/common/GPC_RenderTools.cpp')
-rw-r--r-- | source/gameengine/GamePlayer/common/GPC_RenderTools.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/gameengine/GamePlayer/common/GPC_RenderTools.cpp b/source/gameengine/GamePlayer/common/GPC_RenderTools.cpp index a5b8d8aacdf..edda7657ef9 100644 --- a/source/gameengine/GamePlayer/common/GPC_RenderTools.cpp +++ b/source/gameengine/GamePlayer/common/GPC_RenderTools.cpp @@ -137,6 +137,10 @@ int GPC_RenderTools::ProcessLighting(int layer) { if (m_clientobject) { + if (layer == RAS_LIGHT_OBJECT_LAYER) + { + layer = static_cast<KX_GameObject*>(m_clientobject)->GetLayer(); + } if (applyLights(layer)) { EnableOpenGLLights(); |