mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2025-01-15 22:21:26 +00:00
Simply truncate the per-map COLORMAP lump instead of not reading it at all.
Keep the warning though.
This commit is contained in:
parent
5f339fc2a9
commit
8a778a4070
1 changed files with 5 additions and 5 deletions
10
src/r_data.c
10
src/r_data.c
|
@ -1054,6 +1054,7 @@ void R_ReInitColormaps(UINT16 num)
|
||||||
{
|
{
|
||||||
char colormap[9] = "COLORMAP";
|
char colormap[9] = "COLORMAP";
|
||||||
lumpnum_t lump;
|
lumpnum_t lump;
|
||||||
|
const lumpnum_t basecolormaplump = W_GetNumForName(colormap);
|
||||||
|
|
||||||
if (num > 0 && num <= 10000)
|
if (num > 0 && num <= 10000)
|
||||||
snprintf(colormap, 8, "CLM%04u", num-1);
|
snprintf(colormap, 8, "CLM%04u", num-1);
|
||||||
|
@ -1061,17 +1062,16 @@ void R_ReInitColormaps(UINT16 num)
|
||||||
// Load in the light tables, now 64k aligned for smokie...
|
// Load in the light tables, now 64k aligned for smokie...
|
||||||
lump = W_GetNumForName(colormap);
|
lump = W_GetNumForName(colormap);
|
||||||
if (lump == LUMPERROR)
|
if (lump == LUMPERROR)
|
||||||
lump = W_GetNumForName("COLORMAP");
|
lump = basecolormaplump;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (W_LumpLength(lump) != W_LumpLength(W_GetNumForName("COLORMAP")))
|
if (W_LumpLength(lump) != W_LumpLength(basecolormaplump))
|
||||||
{
|
{
|
||||||
CONS_Alert(CONS_WARNING, "%s lump size does not match COLORMAP, using COLORMAP instead.\n", colormap);
|
CONS_Alert(CONS_WARNING, "%s lump size does not match COLORMAP, results may be unexpected.\n", colormap);
|
||||||
lump = W_GetNumForName("COLORMAP");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
W_ReadLump(lump, colormaps);
|
W_ReadLumpHeader(lump, colormaps, W_LumpLength(basecolormaplump), 0U);
|
||||||
|
|
||||||
// Init Boom colormaps.
|
// Init Boom colormaps.
|
||||||
R_ClearColormaps();
|
R_ClearColormaps();
|
||||||
|
|
Loading…
Reference in a new issue