From 9006bdd6a3576e217875e365d160645f1fd04481 Mon Sep 17 00:00:00 2001 From: toaster Date: Thu, 12 Sep 2019 12:52:25 +0100 Subject: [PATCH] I_Error if no frames are found for a loaded skin's SPR2_STND subspriteset, given this is what everything will default to if nothing else is provided, and I really don't wanna go across the code adding checks for sprite2s not existing (since R_GetSkinSprite2, under all circumstances other than this one, is capable of bouncing back). --- src/r_things.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/r_things.c b/src/r_things.c index bf4b3ca40..ea8b8b73c 100644 --- a/src/r_things.c +++ b/src/r_things.c @@ -2871,6 +2871,8 @@ static void R_LoadSkinSprites(UINT16 wadnum, UINT16 *lump, UINT16 *lastlump, ski for (sprite2 = 0; sprite2 < free_spr2; sprite2++) R_AddSingleSpriteDef((spritename = spr2names[sprite2]), &skin->sprites[sprite2], wadnum, *lump, *lastlump); + if (skin->sprites[0].numframes == 0) + I_Error("R_LoadSkinSprites: no frames found for sprite SPR2_%s\n", spr2names[0]); } // returns whether found appropriate property