mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-12 23:54:33 +00:00
Add handling for drawfullheight flag
Parse drawfullheight flag in UDMF Draw full height for walls if the linedef has this flag
This commit is contained in:
parent
d69becfa57
commit
477381f210
4 changed files with 19 additions and 7 deletions
|
@ -141,6 +141,7 @@ Note: All <bool> fields default to false unless mentioned otherwise.
|
|||
// 13: Portal line.
|
||||
revealed = <bool>; // true = line is initially visible on automap.
|
||||
noskywalls = <bool>; // true = skies are not drawn above or below this line
|
||||
drawfullheight = <bool>; // true = draw the maximum height instead of the minimum height
|
||||
|
||||
health = <int>; // Amount of hitpoints for this line.
|
||||
healthgroup = <int>; // ID of destructible object to synchronize hitpoints (optional, default is 0)
|
||||
|
|
|
@ -1623,11 +1623,14 @@ void GLWall::Process(seg_t *seg, sector_t * frontsector, sector_t * backsector,
|
|||
float bch1a = bch1, bch2a = bch2;
|
||||
if (frontsector->GetTexture(sector_t::floor) != skyflatnum || backsector->GetTexture(sector_t::floor) != skyflatnum)
|
||||
{
|
||||
// the back sector's floor obstructs part of this wall
|
||||
if (ffh1 > bch1 && ffh2 > bch2)
|
||||
// the back sector's floor obstructs part of this wall
|
||||
if (!seg->linedef->flags & ML_DRAWFULLHEIGHT)
|
||||
{
|
||||
bch2a = ffh2;
|
||||
bch1a = ffh1;
|
||||
if (ffh1 > bch1 && ffh2 > bch2)
|
||||
{
|
||||
bch2a = ffh2;
|
||||
bch1a = ffh1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1705,10 +1708,13 @@ void GLWall::Process(seg_t *seg, sector_t * frontsector, sector_t * backsector,
|
|||
|
||||
/* bottom texture */
|
||||
// the back sector's ceiling obstructs part of this wall (specially important for sky sectors)
|
||||
if (fch1 < bfh1 && fch2 < bfh2)
|
||||
if (!seg->linedef->flags & ML_DRAWFULLHEIGHT)
|
||||
{
|
||||
bfh1 = fch1;
|
||||
bfh2 = fch2;
|
||||
if (fch1 < bfh1 && fch2 < bfh2)
|
||||
{
|
||||
bfh1 = fch1;
|
||||
bfh2 = fch2;
|
||||
}
|
||||
}
|
||||
|
||||
if (bfh1 > ffh1 || bfh2 > ffh2)
|
||||
|
|
|
@ -549,6 +549,7 @@ xx(Locknumber)
|
|||
xx(Midtex3dimpassible)
|
||||
xx(Revealed)
|
||||
xx(AutomapStyle)
|
||||
xx(DrawFullHeight)
|
||||
|
||||
xx(Playercross)
|
||||
xx(Playeruse)
|
||||
|
|
|
@ -1102,6 +1102,10 @@ public:
|
|||
Flag(ld->flags, ML_NOSKYWALLS, key);
|
||||
continue;
|
||||
|
||||
case NAME_DrawFullHeight:
|
||||
Flag(ld->flags, ML_DRAWFULLHEIGHT, 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.
|
||||
|
|
Loading…
Reference in a new issue