forked from bartvdbraak/blender
[#21261] Bugfix for dynamically loaded scenes' lights not mixing in multitexture
from Mitchell Stokes (moguri)
This commit is contained in:
parent
f137c4535a
commit
b9211135ef
@ -65,6 +65,8 @@ public:
|
||||
void UnbindShadowBuffer(class RAS_IRasterizer *ras);
|
||||
void Update();
|
||||
|
||||
void UpdateScene(class KX_Scene *kxscene) {m_lightobj.m_scene = (void*)kxscene;}
|
||||
|
||||
virtual int GetGameObjectType() { return OBJ_LIGHT; }
|
||||
|
||||
#ifndef DISABLE_PYTHON
|
||||
|
@ -1754,6 +1754,9 @@ static void MergeScene_GameObject(KX_GameObject* gameobj, KX_Scene *to, KX_Scene
|
||||
phys_ctrl->SetPhysicsEnvironment(to->GetPhysicsEnvironment());
|
||||
}
|
||||
}
|
||||
/* If the object is a light, update it's scene */
|
||||
if (gameobj->GetGameObjectType() == SCA_IObject::OBJ_LIGHT)
|
||||
((KX_LightObject*)gameobj)->UpdateScene(to);
|
||||
|
||||
/* Add the object to the scene's logic manager */
|
||||
to->GetLogicManager()->RegisterGameObjectName(gameobj->GetName(), gameobj);
|
||||
|
Loading…
Reference in New Issue
Block a user