Skip to content

Commit

Permalink
Merge branch 'master' into AutoDoom
Browse files Browse the repository at this point in the history
  • Loading branch information
ioan-chera committed Mar 14, 2017
2 parents cff90f5 + 34aaeec commit ebc54d2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions source/cam_common.cpp
Expand Up @@ -553,6 +553,11 @@ void lineopening_t::calculate(const line_t *linedef)
const sector_t *front = linedef->frontsector;
const sector_t *back = linedef->backsector;

const sector_t *beyond = linedef->intflags & MLI_POLYPORTALLINE &&
linedef->beyondportalline ? linedef->beyondportalline->frontsector : nullptr;
if(beyond)
back = beyond;

// no need to apply the portal hack (1024 units) here fortunately
if(linedef->extflags & EX_ML_UPPERPORTAL)
opentop = front->ceilingheight;
Expand Down
5 changes: 5 additions & 0 deletions source/p_maputl.cpp
Expand Up @@ -262,6 +262,11 @@ void P_LineOpening(const line_t *linedef, const Mobj *mo, bool portaldetect,
}
clip.openfrontsector = linedef->frontsector;
clip.openbacksector = linedef->backsector;
sector_t *beyond = linedef->intflags & MLI_POLYPORTALLINE &&
linedef->beyondportalline ?
linedef->beyondportalline->frontsector : nullptr;
if(beyond)
clip.openbacksector = beyond;

// SoM: ok, new plan. The only way a 2s line should give a lowered floor or hightened ceiling
// z is if both sides of that line have the same portal.
Expand Down

0 comments on commit ebc54d2

Please sign in to comment.