BGE: Make sure lib loaded cameras are added to the active scene's camera list.
authorMitchell Stokes <mogurijin@gmail.com>
Sun, 26 Aug 2012 23:17:50 +0000 (23:17 +0000)
committerMitchell Stokes <mogurijin@gmail.com>
Sun, 26 Aug 2012 23:17:50 +0000 (23:17 +0000)
source/gameengine/Ketsji/KX_Scene.cpp

index 5d4b9ae40c259f5d6fafb7e126fc99b0a5b8fb67..f9fa0ae65f11f93d89abf976f42e20df3f4e7475 100644 (file)
@@ -1825,6 +1825,9 @@ static void MergeScene_GameObject(KX_GameObject* gameobj, KX_Scene *to, KX_Scene
        if (gameobj->GetGameObjectType() == SCA_IObject::OBJ_LIGHT)
                ((KX_LightObject*)gameobj)->UpdateScene(to);
 
+       if (gameobj->GetGameObjectType() == SCA_IObject::OBJ_CAMERA)
+               to->AddCamera((KX_Camera*)gameobj);
+
        /* Add the object to the scene's logic manager */
        to->GetLogicManager()->RegisterGameObjectName(gameobj->GetName(), gameobj);
        to->GetLogicManager()->RegisterGameObj(gameobj->GetBlenderObject(), gameobj);