diff options
Diffstat (limited to 'source/gameengine/Converter/BL_BlenderDataConversion.cpp')
-rw-r--r-- | source/gameengine/Converter/BL_BlenderDataConversion.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/source/gameengine/Converter/BL_BlenderDataConversion.cpp b/source/gameengine/Converter/BL_BlenderDataConversion.cpp index 542c6b5d9e3..d44d987ff86 100644 --- a/source/gameengine/Converter/BL_BlenderDataConversion.cpp +++ b/source/gameengine/Converter/BL_BlenderDataConversion.cpp @@ -2334,6 +2334,14 @@ void BL_ConvertBlenderObjects(struct Main* maggie, bool isInActiveLayer = (blenderobj->lay & activeLayerBitInfo)!=0; BL_ConvertSensors(blenderobj,gameobj,logicmgr,kxscene,keydev,executePriority,activeLayerBitInfo,isInActiveLayer,canvas,converter); } + // apply the initial state to controllers + for ( i=0;i<logicbrick_conversionlist->GetCount();i++) + { + KX_GameObject* gameobj = static_cast<KX_GameObject*>(logicbrick_conversionlist->GetValue(i)); + struct Object* blenderobj = converter->FindBlenderObject(gameobj); + gameobj->SetState(blenderobj->state); + } + #endif //CONVERT_LOGIC logicbrick_conversionlist->Release(); |