diff --git a/src/p_saveg.c b/src/p_saveg.c index 137b4ffd0..eb49e9730 100644 --- a/src/p_saveg.c +++ b/src/p_saveg.c @@ -655,6 +655,8 @@ static void P_NetArchiveWorld(void) WRITEINT32(put, ss->firsttag); WRITEINT32(put, ss->nexttag); } + if (diff3 & SD_MIDMAP) + WRITEINT32(put, ss->midmap); if (diff3 & SD_COLORMAP) { diff --git a/src/p_setup.c b/src/p_setup.c index b503b6a58..d8156992e 100644 --- a/src/p_setup.c +++ b/src/p_setup.c @@ -1470,6 +1470,7 @@ static void P_LoadRawSideDefs2(void *data) { case 63: // variable colormap via 242 linedef case 606: //SoM: 4/4/2000: Just colormap transfer + 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. if ( diff --git a/src/p_spec.c b/src/p_spec.c index 5135676ab..21380584b 100644 --- a/src/p_spec.c +++ b/src/p_spec.c @@ -3250,6 +3250,15 @@ static void P_ProcessLineSpecial(line_t *line, mobj_t *mo, sector_t *callsec) } break; + case 447: // Change colormap of tagged sectors! + // Basically this special applies a colormap to the tagged sectors, just like 606 (the colormap linedef) + // Except it is activated by linedef executor, not level load + // 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; + break; + case 448: // Change skybox viewpoint/centerpoint if ((mo && mo->player && P_IsLocalPlayer(mo->player)) || (line->flags & ML_NOCLIMB)) { diff --git a/src/r_defs.h b/src/r_defs.h index 8dd34cd15..77b56bd30 100644 --- a/src/r_defs.h +++ b/src/r_defs.h @@ -393,6 +393,7 @@ typedef struct sector_s // these are saved for netgames, so do not let Lua touch these! INT32 spawn_nexttag, spawn_firsttag; // the actual nexttag/firsttag values may differ if the sector's tag was changed + INT32 spawn_bottommap, spawn_midmap, spawn_topmap; // offsets sector spawned with (via linedef type 7) fixed_t spawn_flr_xoffs, spawn_flr_yoffs;