Error out when a sprite definition contains a subfolder

This commit is contained in:
LJ Sonic 2024-04-03 22:07:59 +02:00
parent 32a3683e07
commit eaf0ba6658

View file

@ -433,6 +433,9 @@ boolean R_AddSingleSpriteDef(const char *sprname, spritedef_t *spritedef, UINT16
for (l = startlump; l < endlump; l++)
{
if (W_IsLumpFolder(wadnum, l))
I_Error("R_AddSingleSpriteDef: all frame lumps for a sprite should be contained inside a single folder\n");
// For long sprites, the startlump-endlump range only includes
// relevant lumps, so no check needed in that case
if (longname || (strlen(sprname) == 4 && !memcmp(lumpinfo[l].name, sprname, 4)))