mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2025-02-21 02:51:37 +00:00
Add more ways to prevent GZDoom from drawing skybox walls
Add noskywalls flag to sectors and linedefs # Conflicts: # src/hwrenderer/scene/hw_sky.cpp # src/p_udmf.cpp
This commit is contained in:
parent
068f0420a8
commit
43264d9366
6 changed files with 17 additions and 4 deletions
|
@ -140,6 +140,7 @@ Note: All <bool> fields default to false unless mentioned otherwise.
|
|||
// 12: Unexplored secret wall.
|
||||
// 13: Portal line.
|
||||
revealed = <bool>; // true = line is initially visible on automap.
|
||||
noskywalls = <bool>; // true = skies are not drawn above or below this line
|
||||
|
||||
health = <int>; // Amount of hitpoints for this line.
|
||||
healthgroup = <int>; // ID of destructible object to synchronize hitpoints (optional, default is 0)
|
||||
|
@ -285,6 +286,8 @@ Note: All <bool> fields default to false unless mentioned otherwise.
|
|||
coloradd_sprites = <int>; // Additive material color applied to sprites within the sector. Default is black (0x000000)
|
||||
coloradd_walls = <int>; // Additive material color applied to walls within the sector. Default is black (0x000000)
|
||||
|
||||
noskywalls = <bool>; // If true, do not draw skybox walls above/below this sector
|
||||
|
||||
portal_ceil_blocksound = <bool>; // ceiling portal blocks sound.
|
||||
portal_ceil_disabled = <bool>; // ceiling portal disabled.
|
||||
portal_ceil_nopass = <bool>; // ceiling portal blocks movement if true.
|
||||
|
|
|
@ -171,7 +171,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.)
|
||||
};
|
||||
|
||||
|
|
|
@ -232,8 +232,8 @@ void GLWall::SkyTop(seg_t * seg,sector_t * fs,sector_t * bs,vertex_t * v1,vertex
|
|||
{
|
||||
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) ||
|
||||
|
@ -326,7 +326,7 @@ void GLWall::SkyBottom(seg_t * seg,sector_t * fs,sector_t * bs,vertex_t * v1,ver
|
|||
{
|
||||
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(seg->sidedef->GetTexture(side_t::bottom));
|
||||
|
||||
// For lower skies the normal logic only applies to walls with no lower texture!
|
||||
|
|
|
@ -592,6 +592,7 @@ xx(ColorAdd_Floor)
|
|||
xx(ColorAdd_Ceiling)
|
||||
xx(ColorAdd_Sprites)
|
||||
xx(ColorAdd_Walls)
|
||||
xx(NoSkyWalls)
|
||||
xx(Desaturation)
|
||||
xx(SoundSequence)
|
||||
xx(Silent)
|
||||
|
|
|
@ -1098,6 +1098,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.
|
||||
|
@ -1664,6 +1668,10 @@ public:
|
|||
sec->AdditiveColors[sector_t::sprites] = CheckInt(key) | 0xff000000;
|
||||
break;
|
||||
|
||||
case NAME_NoSkyWalls:
|
||||
Flag(sec->MoreFlags, SECMF_NOSKYWALLS, key);
|
||||
break;
|
||||
|
||||
case NAME_Desaturation:
|
||||
desaturation = int(255*CheckFloat(key) + FLT_EPSILON); // FLT_EPSILON to avoid rounding errors with numbers slightly below a full integer.
|
||||
continue;
|
||||
|
|
|
@ -484,6 +484,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
|
||||
|
|
Loading…
Reference in a new issue