diff options
author | Campbell Barton <ideasman42@gmail.com> | 2008-08-28 11:03:23 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2008-08-28 11:03:23 +0400 |
commit | f88c5d972130e7bcde3fdd289e91546c5946c888 (patch) | |
tree | 963fb17a74a28fbd057665976b37e31bcaeacadd /source/gameengine | |
parent | 2934e78a863116bbb3192f64dce7ac7a55732fe6 (diff) |
BGE Bugfix, lights were not being removed when their gameobject was removed causing odd shadows to hang about the scene.
Diffstat (limited to 'source/gameengine')
-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 ab3692d2411..e0a7ebb5423 100644 --- a/source/gameengine/Ketsji/KX_Scene.cpp +++ b/source/gameengine/Ketsji/KX_Scene.cpp @@ -944,6 +944,8 @@ int KX_Scene::NewRemoveObject(class CValue* gameobj) newobj->RemoveMeshes(); ret = 1; + if (newobj->IsLight() && m_lightlist->RemoveValue(newobj)) + ret = newobj->Release(); if (m_objectlist->RemoveValue(newobj)) ret = newobj->Release(); if (m_tempObjectList->RemoveValue(newobj)) |