restrict internal structs to gzdoom.pk3

This commit is contained in:
Ricardo Luís Vaz Silva 2025-03-02 16:58:37 -03:00
commit cb1edbde01

View file

@ -753,7 +753,14 @@ void ZCCCompiler::CreateStructTypes()
if (s->strct->Flags & ZCC_Internal)
{
s->strct->Type->TypeInternal = true;
if(fileSystem.GetFileContainer(Lump) == 0)
{
s->strct->Type->TypeInternal = true;
}
else
{
Error(s->strct, "Internal structs are only allowed in the root pk3");
}
}
auto &sf = s->Type()->ScopeFlags;