diff --git a/src/p_setup.c b/src/p_setup.c index 5d7fd3179..cc5ee3cc8 100644 --- a/src/p_setup.c +++ b/src/p_setup.c @@ -1469,7 +1469,7 @@ static void P_LoadRawSideDefs2(void *data) case 447: // Change colormap of tagged sectors! -- Monster Iestyn 14/06/18 // SoM: R_CreateColormap will only create a colormap in software mode... // Perhaps we should just call it instead of doing the calculations here. - sec->extra_colormap = sec->spawn_extra_colormap = R_CreateColormap(msd->toptexture, msd->midtexture, + sd->colormap_data = R_CreateColormap(msd->toptexture, msd->midtexture, msd->bottomtexture); sd->toptexture = sd->midtexture = sd->bottomtexture = 0; break; diff --git a/src/p_spec.c b/src/p_spec.c index 21380584b..8e5a612c3 100644 --- a/src/p_spec.c +++ b/src/p_spec.c @@ -3256,7 +3256,7 @@ static void P_ProcessLineSpecial(line_t *line, mobj_t *mo, sector_t *callsec) // This could even override existing colormaps I believe // -- Monster Iestyn 14/06/18 for (secnum = -1; (secnum = P_FindSectorFromLineTag(line, secnum)) >= 0 ;) - sectors[secnum].extra_colormap = line->frontsector->extra_colormap; + sectors[secnum].extra_colormap = sides[line->sidenum[0]].colormap_data; break; case 448: // Change skybox viewpoint/centerpoint @@ -6769,7 +6769,7 @@ void P_SpawnSpecials(INT32 fromnetsave) case 606: // HACK! Copy colormaps. Just plain colormaps. for (s = -1; (s = P_FindSectorFromLineTag(lines + i, s)) >= 0 ;) - sectors[s].extra_colormap = sectors[s].spawn_extra_colormap = lines[i].frontsector->extra_colormap; + sectors[s].extra_colormap = sectors[s].spawn_extra_colormap = sides[lines[i].sidenum[0]].colormap_data; break; #ifdef ESLOPE // Slope copy specials. Handled here for sanity. diff --git a/src/r_defs.h b/src/r_defs.h index 63ca29aa1..1f2afdb99 100644 --- a/src/r_defs.h +++ b/src/r_defs.h @@ -476,6 +476,8 @@ typedef struct INT16 repeatcnt; // # of times to repeat midtexture char *text; // a concatination of all top, bottom, and mid texture names, for linedef specials that require a string. + + extracolormap_t *colormap_data; // storage for colormaps; not applied to sectors. } side_t; //