diff --git a/src/Core/Scene/CScriptNode.cpp b/src/Core/Scene/CScriptNode.cpp index ddcb35a9..c08d10cd 100644 --- a/src/Core/Scene/CScriptNode.cpp +++ b/src/Core/Scene/CScriptNode.cpp @@ -179,7 +179,15 @@ void CScriptNode::Draw(FRenderOptions Options, int ComponentIndex, const SViewIn else { - LoadLights(ViewInfo); + // DKCR doesn't support world lighting yet, so light nodes that don't have ingame models with default lighting + if (Template()->Game() == eReturns && !mpInstance->HasInGameModel() && CGraphics::sLightMode == CGraphics::eWorldLighting) + { + CGraphics::SetDefaultLighting(); + CGraphics::sVertexBlock.COLOR0_Amb = CGraphics::skDefaultAmbientColor; + } + + else + LoadLights(ViewInfo); } LoadModelMatrix(); diff --git a/src/Editor/WorldEditor/WInstancesTab.cpp b/src/Editor/WorldEditor/WInstancesTab.cpp index 3ae7c929..200975f0 100644 --- a/src/Editor/WorldEditor/WInstancesTab.cpp +++ b/src/Editor/WorldEditor/WInstancesTab.cpp @@ -144,15 +144,11 @@ void WInstancesTab::OnTreeDoubleClick(QModelIndex Index) if ((mpEditor) && (IndexType == CInstancesModel::eInstanceIndex)) { CInstancesModel::ENodeType NodeType = mpTypesModel->IndexNodeType(SourceIndex); - CSceneNode *pSelectedNode = nullptr; if (NodeType == CInstancesModel::eScriptType) - pSelectedNode = mpScene->NodeForObject( static_cast(SourceIndex.internalPointer()) ); - - if (pSelectedNode) { - mpEditor->ClearSelection(); - mpEditor->SelectNode(pSelectedNode); + CSceneNode *pSelectedNode = mpScene->NodeForObject( static_cast(SourceIndex.internalPointer()) ); + mpEditor->ClearAndSelectNode(pSelectedNode); } } }