Don't need to use WADFILENUM/LUMPNUM in this function, since W_CheckNumForNamePwad returns just the lump number, not a combined WAD + lump number frankenstein's monster

This is just in case someone actually tries to dump in C_START/C_END and "add" colormaps using them, not that they would ever be used currently anyway.
This commit is contained in:
Monster Iestyn 2017-05-15 14:38:55 +01:00
parent 222807c6f6
commit f8482421e5

View file

@ -952,15 +952,16 @@ static void R_InitExtraColormaps(void)
if (endnum == INT16_MAX)
I_Error("R_InitExtraColormaps: C_START without C_END\n");
if (WADFILENUM(startnum) != WADFILENUM(endnum))
I_Error("R_InitExtraColormaps: C_START and C_END in different wad files!\n");
// This shouldn't be possible when you use the Pwad function, silly
//if (WADFILENUM(startnum) != WADFILENUM(endnum))
//I_Error("R_InitExtraColormaps: C_START and C_END in different wad files!\n");
if (numcolormaplumps >= maxcolormaplumps)
maxcolormaplumps *= 2;
colormaplumps = Z_Realloc(colormaplumps,
sizeof (*colormaplumps) * maxcolormaplumps, PU_STATIC, NULL);
colormaplumps[numcolormaplumps].wadfile = WADFILENUM(startnum);
colormaplumps[numcolormaplumps].firstlump = LUMPNUM(startnum+1);
colormaplumps[numcolormaplumps].wadfile = cfile;
colormaplumps[numcolormaplumps].firstlump = startnum+1;
colormaplumps[numcolormaplumps].numlumps = endnum - (startnum + 1);
numcolormaplumps++;
}