From 817368abc28c92310082b338a7e2576a8042b9f1 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Thu, 16 Jun 2011 13:10:03 +0000 Subject: [PATCH] - changed R_InstallSpriteLump so that it doesn't abort for every seemingly misnamed lump in the sprites namespace. A warning is fully sufficient here. SVN r3239 (trunk) --- src/r_things.cpp | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/r_things.cpp b/src/r_things.cpp index bd2122ebd..e49046c62 100644 --- a/src/r_things.cpp +++ b/src/r_things.cpp @@ -161,7 +161,7 @@ CVAR (Bool, r_particles, true, 0); // [RH] Removed checks for coexistance of rotation 0 with other // rotations and made it look more like BOOM's version. // -static void R_InstallSpriteLump (FTextureID lump, unsigned frame, char rot, bool flipped) +static bool R_InstallSpriteLump (FTextureID lump, unsigned frame, char rot, bool flipped) { unsigned rotation; @@ -179,7 +179,10 @@ static void R_InstallSpriteLump (FTextureID lump, unsigned frame, char rot, bool } if (frame >= MAX_SPRITE_FRAMES || rotation > 16) - I_FatalError ("R_InstallSpriteLump: Bad frame characters in lump %s", TexMan[lump]->Name); + { + Printf (TEXTCOLOR_RED"R_InstallSpriteLump: Bad frame characters in lump %s\n", TexMan[lump]->Name); + return false; + } if ((int)frame > maxframe) maxframe = frame; @@ -226,6 +229,7 @@ static void R_InstallSpriteLump (FTextureID lump, unsigned frame, char rot, bool sprtemp[frame].rotate = true; } } + return true; } @@ -467,9 +471,9 @@ void R_InitSpriteDefs () FTexture *tex = TexMan[hash]; if (tex->dwName == intname) { - R_InstallSpriteLump (FTextureID(hash), tex->Name[4] - 'A', tex->Name[5], false); + bool res = R_InstallSpriteLump (FTextureID(hash), tex->Name[4] - 'A', tex->Name[5], false); - if (tex->Name[6]) + if (tex->Name[6] && res) R_InstallSpriteLump (FTextureID(hash), tex->Name[6] - 'A', tex->Name[7], true); } hash = hashes[hash].Next; @@ -1141,9 +1145,9 @@ void R_InitSkins (void) if (lnameint == intname) { FTextureID picnum = TexMan.CreateTexture(k, FTexture::TEX_SkinSprite); - R_InstallSpriteLump (picnum, lname[4] - 'A', lname[5], false); + bool res = R_InstallSpriteLump (picnum, lname[4] - 'A', lname[5], false); - if (lname[6]) + if (lname[6] && res) R_InstallSpriteLump (picnum, lname[6] - 'A', lname[7], true); } }