diff --git a/doomsday/client/src/world/sector.cpp b/doomsday/client/src/world/sector.cpp index 4b9663b96a..15e0706b50 100644 --- a/doomsday/client/src/world/sector.cpp +++ b/doomsday/client/src/world/sector.cpp @@ -65,27 +65,25 @@ void Sector::Cluster::remapVisPlanes() { if(hedge->mapElement()) { + // Abort if any map line lacks a back geometry. + if(!hedge->twin().hasFace()) + return; + if(hedge->mapElement()->as().line().isSelfReferencing()) { - if(hedge->twin().hasFace()) + BspLeaf &otherLeaf = hedge->twin().face().mapElement()->as(); + if(otherLeaf.hasCluster()) { - BspLeaf &otherLeaf = hedge->twin().face().mapElement()->as(); - if(otherLeaf.hasCluster()) + Cluster *otherCluster = &otherLeaf.cluster(); + if(otherCluster != this && + otherCluster->_mappedVisFloor != this && + !(!_allSelfRefBoundary && otherCluster->_allSelfRefBoundary)) { - Cluster *otherCluster = &otherLeaf.cluster(); - if(otherCluster != this && - otherCluster->_mappedVisFloor != this && - !(!_allSelfRefBoundary && otherCluster->_allSelfRefBoundary)) - { - // Remember the exterior cluster. - exteriorCluster = otherCluster; - } + // Remember the exterior cluster. + exteriorCluster = otherCluster; } } } - // Abort if any map line lacks a back geometry. - if(!hedge->twin().hasFace()) - return; } } while((hedge = &hedge->next()) != base); } @@ -110,10 +108,6 @@ void Sector::Cluster::remapVisPlanes() // a different cluster will be selected from the boundary). exteriorCluster->_mappedVisFloor = exteriorCluster->_mappedVisCeiling = 0; - - // Cancel our own linkage too. - _mappedVisFloor = _mappedVisCeiling = 0; - return; } }