Fix R_InitExtraColormaps reporting 6 or more colormaps every time you loaded the game, even though we haven't used C_START/C_END in more than a decade now

Note to self: W_ functions are awfully confusing with returning with LUMPERROR or INT16_MAX. Should sort out what's going on there if necessary
This commit is contained in:
Monster Iestyn 2017-05-15 14:29:31 +01:00
parent 7d4146870a
commit 222807c6f6

View file

@ -944,12 +944,12 @@ static void R_InitExtraColormaps(void)
for (cfile = clump = 0; cfile < numwadfiles; cfile++, clump = 0) for (cfile = clump = 0; cfile < numwadfiles; cfile++, clump = 0)
{ {
startnum = W_CheckNumForNamePwad("C_START", cfile, clump); startnum = W_CheckNumForNamePwad("C_START", cfile, clump);
if (startnum == LUMPERROR) if (startnum == INT16_MAX)
continue; continue;
endnum = W_CheckNumForNamePwad("C_END", cfile, clump); endnum = W_CheckNumForNamePwad("C_END", cfile, clump);
if (endnum == LUMPERROR) if (endnum == INT16_MAX)
I_Error("R_InitExtraColormaps: C_START without C_END\n"); I_Error("R_InitExtraColormaps: C_START without C_END\n");
if (WADFILENUM(startnum) != WADFILENUM(endnum)) if (WADFILENUM(startnum) != WADFILENUM(endnum))