mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-11 18:50:46 +00:00
Polymer: Correct(er) TROR walking.
Enumerate the vertical siblings of each walked sector and check them against the current frustum. No occlusion queries yet, but that should correct any missing sectors until a flaw in that logic is discovered. git-svn-id: https://svn.eduke32.com/eduke32@1975 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
6de59ef085
commit
936147e33b
1 changed files with 31 additions and 22 deletions
|
@ -1475,6 +1475,8 @@ static void polymer_displayrooms(int16_t dacursectnum)
|
||||||
{
|
{
|
||||||
sectortype *sec;
|
sectortype *sec;
|
||||||
int32_t i;
|
int32_t i;
|
||||||
|
int16_t bunchnum;
|
||||||
|
int16_t ns;
|
||||||
GLint result;
|
GLint result;
|
||||||
int16_t doquery;
|
int16_t doquery;
|
||||||
int32_t front;
|
int32_t front;
|
||||||
|
@ -1635,6 +1637,35 @@ static void polymer_displayrooms(int16_t dacursectnum)
|
||||||
i--;
|
i--;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// queue ROR neighbors
|
||||||
|
if ((sec->floorstat & 1024) &&
|
||||||
|
(bunchnum = yax_getbunch(sectorqueue[front], YAX_FLOOR)) >= 0) {
|
||||||
|
|
||||||
|
for (SECTORS_OF_BUNCH(bunchnum, YAX_CEILING, ns)) {
|
||||||
|
|
||||||
|
if (ns >= 0 && !drawingstate[ns] &&
|
||||||
|
polymer_planeinfrustum(&prsectors[ns]->ceil, frustum)) {
|
||||||
|
|
||||||
|
sectorqueue[back++] = ns;
|
||||||
|
drawingstate[ns] = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((sec->ceilingstat & 1024) &&
|
||||||
|
(bunchnum = yax_getbunch(sectorqueue[front], YAX_CEILING)) >= 0) {
|
||||||
|
|
||||||
|
for (SECTORS_OF_BUNCH(bunchnum, YAX_FLOOR, ns)) {
|
||||||
|
|
||||||
|
if (ns >= 0 && !drawingstate[ns] &&
|
||||||
|
polymer_planeinfrustum(&prsectors[ns]->floor, frustum)) {
|
||||||
|
|
||||||
|
sectorqueue[back++] = ns;
|
||||||
|
drawingstate[ns] = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
i = sec->wallnum-1;
|
i = sec->wallnum-1;
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
|
@ -1660,28 +1691,6 @@ static void polymer_displayrooms(int16_t dacursectnum)
|
||||||
drawingstate[wall[sec->wallptr + i].nextsector] = 1;
|
drawingstate[wall[sec->wallptr + i].nextsector] = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// queue ROR neighbors
|
|
||||||
if (sec->floorstat & 1024) {
|
|
||||||
int16_t nextsec;
|
|
||||||
|
|
||||||
nextsec = sectorofwall(yax_getnextwall(sec->wallptr + i, YAX_FLOOR));
|
|
||||||
|
|
||||||
if (nextsec >= 0 && !drawingstate[nextsec]) {
|
|
||||||
sectorqueue[back++] = nextsec;
|
|
||||||
drawingstate[nextsec] = 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (sec->ceilingstat & 1024) {
|
|
||||||
int16_t nextsec;
|
|
||||||
|
|
||||||
nextsec = sectorofwall(yax_getnextwall(sec->wallptr + i, YAX_CEILING));
|
|
||||||
|
|
||||||
if (nextsec >= 0 && !drawingstate[nextsec]) {
|
|
||||||
sectorqueue[back++] = nextsec;
|
|
||||||
drawingstate[nextsec] = 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
while (--i >= 0);
|
while (--i >= 0);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue