mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-12 11:10:39 +00:00
Few fixes for the visibility checks.
git-svn-id: https://svn.eduke32.com/eduke32@1328 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
1889e9151b
commit
6dba1ba1ed
1 changed files with 44 additions and 31 deletions
|
@ -1101,8 +1101,11 @@ static void polymer_displayrooms(int16_t dacursectnum)
|
|||
(wallvisible(sec->wallptr + i)) &&
|
||||
(polymer_planeinfrustum(&prwalls[sec->wallptr + i]->mask, frustum)))
|
||||
{
|
||||
if (prwalls[sec->wallptr + i]->mask.vertcount == 4)
|
||||
if ((prwalls[sec->wallptr + i]->mask.vertcount == 4) &&
|
||||
!(prwalls[sec->wallptr + i]->underover & 4) &&
|
||||
!(prwalls[sec->wallptr + i]->underover & 8))
|
||||
{
|
||||
// early exit for closed sectors
|
||||
_prwall *w;
|
||||
|
||||
w = prwalls[sec->wallptr + i];
|
||||
|
@ -1128,6 +1131,7 @@ static void polymer_displayrooms(int16_t dacursectnum)
|
|||
mirrorcount++;
|
||||
}
|
||||
|
||||
if (!(wall[sec->wallptr + i].cstat & 32)) {
|
||||
if (doquery && (!drawingstate[wall[sec->wallptr + i].nextsector]))
|
||||
{
|
||||
float pos[3], sqdist;
|
||||
|
@ -1147,6 +1151,10 @@ static void polymer_displayrooms(int16_t dacursectnum)
|
|||
if (sqdist < 100)
|
||||
queryid[sec->wallptr + i] = 0xFFFFFFFF;
|
||||
else {
|
||||
_prwall *w;
|
||||
|
||||
w = prwalls[sec->wallptr + i];
|
||||
|
||||
bglColorMask(GL_FALSE, GL_FALSE, GL_FALSE, GL_FALSE);
|
||||
bglDepthMask(GL_FALSE);
|
||||
|
||||
|
@ -1156,7 +1164,11 @@ static void polymer_displayrooms(int16_t dacursectnum)
|
|||
oldoverridematerial = overridematerial;
|
||||
overridematerial = 0;
|
||||
|
||||
polymer_drawplane(&prwalls[sec->wallptr + i]->mask);
|
||||
if ((w->underover & 4) && (w->underover & 1))
|
||||
polymer_drawplane(&w->wall);
|
||||
polymer_drawplane(&w->mask);
|
||||
if ((w->underover & 8) && (w->underover & 2))
|
||||
polymer_drawplane(&w->over);
|
||||
|
||||
overridematerial = oldoverridematerial;
|
||||
|
||||
|
@ -1168,6 +1180,7 @@ static void polymer_displayrooms(int16_t dacursectnum)
|
|||
} else
|
||||
queryid[sec->wallptr + i] = 1;
|
||||
}
|
||||
}
|
||||
|
||||
i++;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue