- made some changes so that material definitions can properly check automatic layers when determining their material type.

Most importantly this means that any texture with a custom material definition needs to load its automatic layers before applying the definition.
This commit is contained in:
Christoph Oelckers 2020-06-03 21:15:32 +02:00
commit 720853cff8
5 changed files with 12 additions and 8 deletions

View file

@ -149,6 +149,7 @@ void FGameTexture::AddAutoMaterials()
{ "materials/ao/", &FGameTexture::AmbientOcclusion }
};
if (flags & GTexf_AutoMaterialsAdded) return; // do this only once
bool fullname = !!(flags & GTexf_FullNameTexture);
FString searchname = GetName();
@ -177,6 +178,7 @@ void FGameTexture::AddAutoMaterials()
}
}
}
flags |= GTexf_AutoMaterialsAdded;
}
//===========================================================================