diff --git a/src/p_setup.c b/src/p_setup.c index 2361d1efd..0119e6584 100644 --- a/src/p_setup.c +++ b/src/p_setup.c @@ -678,6 +678,7 @@ static void P_LoadRawSectors(UINT8 *data, size_t i) ss->ceilingpic = P_AddLevelFlat(ms->ceilingpic, foundflats); ss->lightlevel = SHORT(ms->lightlevel); + ss->spawn_lightlevel = SHORT(ms->lightlevel); ss->special = SHORT(ms->special); ss->tag = SHORT(ms->tag); ss->nexttag = ss->firsttag = -1; diff --git a/src/r_defs.h b/src/r_defs.h index ea5db3947..65f8ee5c6 100644 --- a/src/r_defs.h +++ b/src/r_defs.h @@ -385,6 +385,9 @@ typedef struct sector_s boolean hasslope; // The sector, or one of its visible FOFs, contains a slope #endif + // for fade thinker + INT16 spawn_lightlevel; + // 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