Skip to content

Commit

Permalink
Map Importer: Detecting self-referencing lines
Browse files Browse the repository at this point in the history
Check for the use of middle textures.

IssueID #2370
  • Loading branch information
skyjake committed Jan 6, 2020
1 parent 11bdcc3 commit 9eca1f4
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions doomsday/apps/plugins/importidtech1/src/mapimporter.cpp
Expand Up @@ -869,10 +869,14 @@ DENG2_PIMPL(MapImporter)

bool isSelfReferencing(const LineDef &line) const
{
// Use of middle materials indicates that this is not a render hack.
const auto *s = line.sides;
return !(line.aFlags & LAF_POLYOBJ) &&
line.isTwoSided() &&
sides[line.sides[0]].sector == sides[line.sides[1]].sector &&
sides[line.sides[0]].sector >= 0;
!sides[s[0]].middleMaterial &&
!sides[s[1]].middleMaterial &&
sides[s[0]].sector == sides[s[1]].sector &&
sides[s[0]].sector >= 0;
}

int otherSector(const LineDef &line, int sectorIndex) const
Expand Down

0 comments on commit 9eca1f4

Please sign in to comment.