ANIMDEFS now only reports the "flats are disabled" warning for ANIMDEFs in the most recently loaded file.

Notably, this means there are no warnings produced if an added file contains no errors, reducing even MORE of the friction the addons menu has been experiencing in devbuilds lately.
This commit is contained in:
toaster 2022-05-14 15:43:50 +01:00
parent 884064049e
commit 8593074d19

View file

@ -164,6 +164,9 @@ void P_ParseAnimationDefintion(SINT8 istexture);
* \sa P_FindAnimatedFlat, P_SetupLevelFlatAnims
* \author Steven McGranahan (original), Shadow Hog (had to rewrite it to handle multiple WADs), JTE (had to rewrite it to handle multiple WADs _correctly_)
*/
static boolean animdeftempflats = false; // only until ANIMDEFS flats are removed
void P_InitPicAnims(void)
{
// Init animation
@ -183,6 +186,7 @@ void P_InitPicAnims(void)
while (animdefsLumpNum != INT16_MAX)
{
animdeftempflats = ((p_adding_file == INT16_MAX) || p_adding_file == w);
P_ParseANIMDEFSLump(w, animdefsLumpNum);
animdefsLumpNum = W_CheckNumForNamePwad("ANIMDEFS", (UINT16)w, animdefsLumpNum + 1);
}
@ -204,7 +208,7 @@ void P_InitPicAnims(void)
lastanim = anims;
for (i = 0; animdefs[i].istexture != -1; i++)
{
if (animdefs[i].istexture)
if (animdefs[i].istexture == 1)
{
if (R_CheckTextureNumForName(animdefs[i].startname) == -1)
continue;
@ -214,11 +218,13 @@ void P_InitPicAnims(void)
}
else
{
CONS_Alert(CONS_WARNING, "ANIMDEFS flats are disabled; flat support in general will be removed soon! (%s, %s)\n", animdefs[i].startname, animdefs[i].endname);
if (animdefs[i].istexture == 2)
{
CONS_Alert(CONS_WARNING, "ANIMDEFS flats are disabled; flat support in general will be removed soon! (%s, %s)\n", animdefs[i].startname, animdefs[i].endname);
}
continue;
}
#if 0
else
{
if ((W_CheckNumForName(animdefs[i].startname)) == LUMPERROR)
continue;
@ -374,7 +380,10 @@ void P_ParseAnimationDefintion(SINT8 istexture)
Z_Free(animdefsToken);
// set texture type
animdefs[i].istexture = istexture;
if (istexture)
animdefs[i].istexture = 1;
else
animdefs[i].istexture = (animdeftempflats ? 2 : 0);
// "RANGE"
animdefsToken = M_GetToken(NULL);