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/Ketsji/KX_Scene.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/Ketsji/KX_Scene.cpp')
-rw-r--r-- | source/gameengine/Ketsji/KX_Scene.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/source/gameengine/Ketsji/KX_Scene.cpp b/source/gameengine/Ketsji/KX_Scene.cpp index 54003284e03..e4054e07475 100644 --- a/source/gameengine/Ketsji/KX_Scene.cpp +++ b/source/gameengine/Ketsji/KX_Scene.cpp @@ -650,6 +650,8 @@ SCA_IObject* KX_Scene::AddReplicaObject(class CValue* originalobject, for (git = m_logicHierarchicalGameObjects.begin();!(git==m_logicHierarchicalGameObjects.end());++git) { (*git)->Relink(&m_map_gameobject_to_replica); + // add the object in the layer of the parent + (*git)->SetLayer(parentobj->GetLayer()); } // now replicate logic |