diff --git a/specs/udmf_zdoom.txt b/specs/udmf_zdoom.txt index 2559ebe786..af91fba0ad 100644 --- a/specs/udmf_zdoom.txt +++ b/specs/udmf_zdoom.txt @@ -140,6 +140,7 @@ Note: All fields default to false unless mentioned otherwise. // 12: Unexplored secret wall. // 13: Portal line. revealed = ; // true = line is initially visible on automap. + noskywalls = ; // true = skies are not drawn above or below this line health = ; // Amount of hitpoints for this line. healthgroup = ; // ID of destructible object to synchronize hitpoints (optional, default is 0) @@ -294,6 +295,8 @@ Note: All fields default to false unless mentioned otherwise. colorization_floor = ; // Sets a colorization record for the floor texture. Colorization records must be defined in TEXTURES. colorization_ceiling = ; // Sets a colorization record for the ceiling texture. Colorization records must be defined in TEXTURES. + noskywalls = ; // If true, do not draw skybox walls above/below this sector + portal_ceil_blocksound = ; // ceiling portal blocks sound. portal_ceil_disabled = ; // ceiling portal disabled. portal_ceil_nopass = ; // ceiling portal blocks movement if true. diff --git a/src/doomdata.h b/src/doomdata.h index 8e992a8124..130104c7b7 100644 --- a/src/doomdata.h +++ b/src/doomdata.h @@ -173,7 +173,7 @@ enum ELineFlags : unsigned ML_BLOCKHITSCAN = 0x08000000, // blocks hitscan attacks ML_3DMIDTEX_IMPASS = 0x10000000, // [TP] if 3D midtex, behaves like a height-restricted ML_BLOCKING ML_REVEALED = 0x20000000, // set if revealed in automap - + ML_NOSKYWALLS = 0x40000000, // Don't draw sky above or below walls ML_PORTALCONNECT = 0x80000000, // for internal use only: This line connects to a sector with a linked portal (used to speed up sight checks.) }; diff --git a/src/gamedata/r_defs.h b/src/gamedata/r_defs.h index 4987ee6fc5..1ea203f2dd 100644 --- a/src/gamedata/r_defs.h +++ b/src/gamedata/r_defs.h @@ -485,6 +485,7 @@ enum SECMF_DRAWN = 128, // sector has been drawn at least once SECMF_HIDDEN = 256, // Do not draw on textured automap SECMF_OVERLAPPING = 512, // floor and ceiling overlap and require special renderer action. + SECMF_NOSKYWALLS = 1024, // Do not draw "sky walls" }; enum diff --git a/src/maploader/udmf.cpp b/src/maploader/udmf.cpp index 33d10cdeb0..054f8142b0 100644 --- a/src/maploader/udmf.cpp +++ b/src/maploader/udmf.cpp @@ -1074,6 +1074,10 @@ public: ld->automapstyle = AutomapLineStyle(CheckInt(key)); continue; + case NAME_NoSkyWalls: + Flag(ld->flags, ML_NOSKYWALLS, key); + continue; + case NAME_MoreIds: // delay parsing of the tag string until parsing of the sector is complete // This ensures that the ID is always the first tag in the list. @@ -1662,6 +1666,10 @@ public: sec->AdditiveColors[sector_t::sprites] = CheckInt(key) | 0xff000000; break; + case NAME_NoSkyWalls: + Flag(sec->MoreFlags, SECMF_NOSKYWALLS, key); + break; + case NAME_colorization_floor: sec->SetTextureFx(sector_t::floor, TexMan.GetTextureManipulation(CheckString(key))); break; diff --git a/src/rendering/hwrenderer/scene/hw_sky.cpp b/src/rendering/hwrenderer/scene/hw_sky.cpp index 695184a7e8..b1bd7cb614 100644 --- a/src/rendering/hwrenderer/scene/hw_sky.cpp +++ b/src/rendering/hwrenderer/scene/hw_sky.cpp @@ -230,8 +230,8 @@ void HWWall::SkyTop(HWDrawInfo *di, seg_t * seg,sector_t * fs,sector_t * bs,vert { if (fs->GetTexture(sector_t::ceiling)==skyflatnum) { - if (bs->special == GLSector_NoSkyDraw) return; - if (bs->GetTexture(sector_t::ceiling)==skyflatnum) + if (bs->special == GLSector_NoSkyDraw || bs->MoreFlags & SECMF_NOSKYWALLS || seg->linedef->flags & ML_NOSKYWALLS) return; + if (bs->GetTexture(sector_t::ceiling)==skyflatnum) { // if the back sector is closed the sky must be drawn! if (bs->ceilingplane.ZatPoint(v1) > bs->floorplane.ZatPoint(v1) || @@ -324,7 +324,7 @@ void HWWall::SkyBottom(HWDrawInfo *di, seg_t * seg,sector_t * fs,sector_t * bs,v { if (fs->GetTexture(sector_t::floor)==skyflatnum) { - if (bs->special == GLSector_NoSkyDraw) return; + if (bs->special == GLSector_NoSkyDraw || bs->MoreFlags & SECMF_NOSKYWALLS || seg->linedef->flags & ML_NOSKYWALLS) return; FTexture * tex = TexMan.GetTexture(seg->sidedef->GetTexture(side_t::bottom), true); // For lower skies the normal logic only applies to walls with no lower texture. diff --git a/src/utility/namedef.h b/src/utility/namedef.h index c0d5f82d3d..8cee067cd3 100644 --- a/src/utility/namedef.h +++ b/src/utility/namedef.h @@ -594,6 +594,7 @@ xx(ColorAdd_Floor) xx(ColorAdd_Ceiling) xx(ColorAdd_Sprites) xx(ColorAdd_Walls) +xx(NoSkyWalls) xx(Desaturation) xx(SoundSequence) xx(Silent)