Merge branch 'getsprite2patch-fallback' into 'next'

Make v.getSprite2Patch able to fallback to non-super sprites

See merge request STJr/SRB2!2597
This commit is contained in:
Lactozilla 2025-01-20 02:08:24 +00:00
commit c935d0a5a2

View file

@ -613,6 +613,10 @@ static int libd_getSprite2Patch(lua_State *L)
if (super)
j |= SPR2F_SUPER;
// If there is no "super" variation of this sprite, try with the normal one.
if (!P_IsValidSprite2(skins[i], j))
j &= ~SPR2F_SUPER;
sprdef = P_GetSkinSpritedef(skins[i], j);
// set frame number