Merge branch 'animdef-type-check-fix' into 'master'

Animdef type check fix

This fixes Sphere's problem with ANIMDEFS, where animated textures and animated flats with the same name cause one or the other not to animate (depending on the order they are in the ANIMDEFS lump, not the WAD; if the texture animdef comes first the texture animates, if the flat animdef comes first the flat animates).

The game now compares the "type" (i.e. whether the anim is for a texture or flat) of a new animdef with that of existing typedefs, before deciding whether to ignore it based on the starting lump's name.

See merge request !100
This commit is contained in:
Monster Iestyn 2017-07-02 09:44:39 -04:00
commit 7b551ed409

View file

@ -456,7 +456,8 @@ void P_ParseAnimationDefintion(SINT8 istexture)
// Search for existing animdef
for (i = 0; i < maxanims; i++)
if (stricmp(animdefsToken, animdefs[i].startname) == 0)
if (animdefs[i].istexture == istexture // Check if it's the same type!
&& stricmp(animdefsToken, animdefs[i].startname) == 0)
{
//CONS_Alert(CONS_NOTICE, "Duplicate animation: %s\n", animdefsToken);