From b78b1924f3999bdc365984431f8f3ecf16ef4d1a Mon Sep 17 00:00:00 2001 From: Mitchell Stokes Date: Sun, 26 Aug 2012 23:17:50 +0000 Subject: BGE: Make sure lib loaded cameras are added to the active scene's camera list. --- source/gameengine/Ketsji/KX_Scene.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source/gameengine') diff --git a/source/gameengine/Ketsji/KX_Scene.cpp b/source/gameengine/Ketsji/KX_Scene.cpp index 5d4b9ae40c2..f9fa0ae65f1 100644 --- a/source/gameengine/Ketsji/KX_Scene.cpp +++ b/source/gameengine/Ketsji/KX_Scene.cpp @@ -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); -- cgit v1.2.3