Skip to content

Commit

Permalink
Fixed|Heretic|Map Importer: Misdetected render hack in Heretic E1M1
Browse files Browse the repository at this point in the history
IssueID #2370
  • Loading branch information
skyjake committed Dec 15, 2019
1 parent 81bcdfb commit 55e4359
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion doomsday/apps/plugins/importidtech1/src/mapimporter.cpp
Expand Up @@ -1174,6 +1174,7 @@ DENG2_PIMPL(MapImporter)

// Detect self-referencing sectors: all lines of the sector are two-sided and both
// sides refer to the sector itself.
// For example: TNT map02 deep water.
{
bool foundSelfRefs = false;

Expand Down Expand Up @@ -1209,7 +1210,8 @@ DENG2_PIMPL(MapImporter)
}
}

// Transparent window: sector without wall textures.
// Flat bleeding caused by sector without wall textures.
// For example: TNT map09 transparent window.
{
for (int currentSector = 0; currentSector < int(sectors.size()); ++currentSector)
{
Expand Down Expand Up @@ -1242,6 +1244,16 @@ DENG2_PIMPL(MapImporter)
untexturedCount++;
}

const int innerSide = sideOfSector(line, currentSector);
if ((line.ddFlags & DDLF_DONTPEGBOTTOM) &&
sides[line.sides[innerSide]].topMaterial)
{
// This looks like a door.
// Avoids triggering in Heretic E1M1 secret door, for example.
good = false;
break;
}

const int other = otherSector(line, currentSector);
if (other == currentSector || sectors[other].hackFlags)
{
Expand Down

0 comments on commit 55e4359

Please sign in to comment.