Skip to content

Commit

Permalink
World|Sector: Improved sector cluster linking wrt independent but nes…
Browse files Browse the repository at this point in the history
…ted hacks

This iteration of the linking algorithm resolves cases such as the
twin balcony bridge in requiem.wad MAP13 and the nukeage pools in
av.wad MAP01 (the latter is not yet completely fixed, however).
  • Loading branch information
danij-deng committed Aug 26, 2013
1 parent c76bb55 commit 4e1cc26
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions doomsday/client/src/world/sector.cpp
Expand Up @@ -73,11 +73,10 @@ void Sector::Cluster::remapVisPlanes()
if(otherLeaf.hasCluster())
{
Cluster *otherCluster = &otherLeaf.cluster();
if(otherCluster != this)
if(otherCluster != this &&
otherCluster->_mappedVisFloor != this &&
!(!_allSelfRefBoundary && otherCluster->_allSelfRefBoundary))
{
if(!_allSelfRefBoundary && otherCluster->_allSelfRefBoundary)
return;

// Remember the exterior cluster.
exteriorCluster = otherCluster;
}
Expand Down Expand Up @@ -106,9 +105,11 @@ void Sector::Cluster::remapVisPlanes()
}
else
{
// Reverse the linkage (this cluster is containted).
// This cluster is containted. Remove linkage from exterior to
// this thereby forcing it to be re-evaluated (however next time
// a different cluster will be selected from the boundary).
exteriorCluster->_mappedVisFloor =
exteriorCluster->_mappedVisCeiling = exteriorCluster;
exteriorCluster->_mappedVisCeiling = 0;
}
}

Expand Down

0 comments on commit 4e1cc26

Please sign in to comment.