Fixed undo/redo when selecting objects from the instance view, set DKCR to render basic lighting for objects with no ingame model

This commit is contained in:
parax0
2016-02-27 02:51:11 -07:00
parent ecab7be63f
commit 6ac7c1cbd2
2 changed files with 11 additions and 7 deletions

View File

@@ -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();