Change LOAD_LEGACY_RENDERER_FOR_EDITOR from true -> false (#315)
Change LOAD_LEGACY_RENDERER_FOR_EDITOR from true -> false, and added some null checks to protect against gEnv->pRenderer and gEnv->p3DEngine now being null in the editor as well as the launcher.
This commit is contained in:
@@ -525,6 +525,11 @@ void CMaterialManager::OnEditorNotifyEvent(EEditorNotifyEvent event)
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
void CMaterialManager::ReloadDirtyMaterials()
|
||||
{
|
||||
if (!GetIEditor()->Get3DEngine())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
IMaterialManager* runtimeMaterialManager = GetIEditor()->Get3DEngine()->GetMaterialManager();
|
||||
|
||||
uint32 mtlCount = 0;
|
||||
@@ -743,12 +748,15 @@ int CMaterialManager::GetHighlightFlags(CMaterial* pMaterial) const
|
||||
result |= eHighlight_NoSurfaceType;
|
||||
}
|
||||
|
||||
if (ISurfaceTypeManager* pSurfaceManager = GetIEditor()->Get3DEngine()->GetMaterialManager()->GetSurfaceTypeManager())
|
||||
if (GetIEditor()->Get3DEngine())
|
||||
{
|
||||
const ISurfaceType* pSurfaceType = pSurfaceManager->GetSurfaceTypeByName(surfaceTypeName.toUtf8().data());
|
||||
if (pSurfaceType && pSurfaceType->GetBreakability() != 0)
|
||||
if (ISurfaceTypeManager* pSurfaceManager = GetIEditor()->Get3DEngine()->GetMaterialManager()->GetSurfaceTypeManager())
|
||||
{
|
||||
result |= eHighlight_Breakable;
|
||||
const ISurfaceType* pSurfaceType = pSurfaceManager->GetSurfaceTypeByName(surfaceTypeName.toUtf8().data());
|
||||
if (pSurfaceType && pSurfaceType->GetBreakability() != 0)
|
||||
{
|
||||
result |= eHighlight_Breakable;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user