restrict internal structs to gzdoom.pk3

This commit is contained in:
Ricardo Luís Vaz Silva 2025-03-02 16:58:37 -03:00
parent 93c8af32ca
commit 02523b1f90

View file

@ -760,7 +760,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;