mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-25 11:10:47 +00:00
Polymer: fix rendering of middle part of 1-way masked wall.
It does not depend on the "swap bottom wall parts" bit being set. The fix is by matching up the related code with Polymost. git-svn-id: https://svn.eduke32.com/eduke32@5230 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
7a89c58360
commit
c6f0c467e3
1 changed files with 13 additions and 8 deletions
|
@ -3149,18 +3149,23 @@ static void polymer_updatewall(int16_t wallnum)
|
||||||
|
|
||||||
if ((wal->cstat & 16) || (wal->cstat & 32))
|
if ((wal->cstat & 16) || (wal->cstat & 32))
|
||||||
{
|
{
|
||||||
// mask wall pass
|
const int botSwap = (wal->cstat & 4);
|
||||||
if (wal->cstat & 4)
|
|
||||||
yref = min(sec->floorz, nsec->floorz);
|
|
||||||
else
|
|
||||||
yref = max(sec->ceilingz, nsec->ceilingz);
|
|
||||||
|
|
||||||
if (wal->cstat & 32)
|
if (wal->cstat & 32)
|
||||||
{
|
{
|
||||||
if ((!(wal->cstat & 2) && (wal->cstat & 4)) || ((wal->cstat & 2) && (wall[nwallnum].cstat & 4)))
|
// 1-sided wall
|
||||||
yref = sec->ceilingz;
|
if (nsec)
|
||||||
|
yref = botSwap ? sec->ceilingz : nsec->ceilingz;
|
||||||
else
|
else
|
||||||
yref = nsec->ceilingz;
|
yref = botSwap ? sec->floorz : sec->ceilingz;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// masked wall
|
||||||
|
if (botSwap)
|
||||||
|
yref = min(sec->floorz, nsec->floorz);
|
||||||
|
else
|
||||||
|
yref = max(sec->ceilingz, nsec->ceilingz);
|
||||||
}
|
}
|
||||||
|
|
||||||
curpicnum = walloverpicnum;
|
curpicnum = walloverpicnum;
|
||||||
|
|
Loading…
Reference in a new issue