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:
helixhorned 2015-05-22 12:43:26 +00:00
parent 7a89c58360
commit c6f0c467e3

View file

@ -3149,18 +3149,23 @@ static void polymer_updatewall(int16_t wallnum)
if ((wal->cstat & 16) || (wal->cstat & 32))
{
// mask wall pass
if (wal->cstat & 4)
yref = min(sec->floorz, nsec->floorz);
else
yref = max(sec->ceilingz, nsec->ceilingz);
const int botSwap = (wal->cstat & 4);
if (wal->cstat & 32)
{
if ((!(wal->cstat & 2) && (wal->cstat & 4)) || ((wal->cstat & 2) && (wall[nwallnum].cstat & 4)))
yref = sec->ceilingz;
// 1-sided wall
if (nsec)
yref = botSwap ? sec->ceilingz : nsec->ceilingz;
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;